Changeset View
Changeset View
Standalone View
Standalone View
contrib/elftoolchain/libdwarf/libdwarf_reloc.c
Show All 37 Lines | _dwarf_get_reloc_type(Dwarf_P_Debug dbg, int is64) | ||||
case DW_ISA_AARCH64: | case DW_ISA_AARCH64: | ||||
return (is64 ? R_AARCH64_ABS64 : R_AARCH64_ABS32); | return (is64 ? R_AARCH64_ABS64 : R_AARCH64_ABS32); | ||||
case DW_ISA_X86: | case DW_ISA_X86: | ||||
return (R_386_32); | return (R_386_32); | ||||
case DW_ISA_X86_64: | case DW_ISA_X86_64: | ||||
return (is64 ? R_X86_64_64 : R_X86_64_32); | return (is64 ? R_X86_64_64 : R_X86_64_32); | ||||
case DW_ISA_SPARC: | case DW_ISA_SPARC: | ||||
return (is64 ? R_SPARC_UA64 : R_SPARC_UA32); | return (is64 ? R_SPARC_UA64 : R_SPARC_UA32); | ||||
case DW_ISA_PPC: | case DW_ISA_PPC: | ||||
return (R_PPC_ADDR32); | return (is64 ? R_PPC64_ADDR64 : R_PPC_ADDR32); | ||||
bdragon: OK obviously I got this one backwards. | |||||
emasteUnsubmitted Not Done Inline Actionswhere does this actually get used in the tree? emaste: where does this actually get used in the tree? | |||||
bdragonAuthorUnsubmitted Done Inline ActionsIt looks to me like this bit might only be used if you're using libdwarf to *generate* dwarf data. I am not convinced there's anything in-tree using it this way. bdragon: It looks to me like this bit might only be used if you're using libdwarf to *generate* dwarf… | |||||
emasteUnsubmitted Not Done Inline ActionsI'm now not convinced anything is using this in or out of the tree, so it's perhaps somewhat academic. (See e.g. https://codesearch.debian.net/search?q=DW_ISA_PPC or a web search for DW_ISA_PPC) Presumably we would treat PPC/PPC64 as with MIPS (a single DW_ISA_ constant) not as with x86 (which has two). emaste: I'm now not convinced anything is using this in or out of the tree, so it's perhaps somewhat… | |||||
case DW_ISA_ARM: | case DW_ISA_ARM: | ||||
return (R_ARM_ABS32); | return (R_ARM_ABS32); | ||||
case DW_ISA_MIPS: | case DW_ISA_MIPS: | ||||
return (is64 ? R_MIPS_64 : R_MIPS_32); | return (is64 ? R_MIPS_64 : R_MIPS_32); | ||||
case DW_ISA_RISCV: | case DW_ISA_RISCV: | ||||
return (is64 ? R_RISCV_64 : R_RISCV_32); | return (is64 ? R_RISCV_64 : R_RISCV_32); | ||||
case DW_ISA_IA64: | case DW_ISA_IA64: | ||||
return (is64 ? R_IA_64_DIR64LSB : R_IA_64_DIR32LSB); | return (is64 ? R_IA_64_DIR64LSB : R_IA_64_DIR32LSB); | ||||
Show All 35 Lines | case EM_SPARC: | ||||
if (rel_type == R_SPARC_UA32) | if (rel_type == R_SPARC_UA32) | ||||
return (4); | return (4); | ||||
else if (rel_type == R_SPARC_UA64) | else if (rel_type == R_SPARC_UA64) | ||||
return (8); | return (8); | ||||
break; | break; | ||||
case EM_PPC: | case EM_PPC: | ||||
if (rel_type == R_PPC_ADDR32) | if (rel_type == R_PPC_ADDR32) | ||||
return (4); | return (4); | ||||
break; | |||||
case EM_PPC64: | |||||
if (rel_type == R_PPC_ADDR32) | |||||
return (4); | |||||
else if (rel_type == R_PPC64_ADDR64) | |||||
return (8); | |||||
break; | break; | ||||
case EM_MIPS: | case EM_MIPS: | ||||
if (rel_type == R_MIPS_32) | if (rel_type == R_MIPS_32) | ||||
return (4); | return (4); | ||||
else if (rel_type == R_MIPS_64) | else if (rel_type == R_MIPS_64) | ||||
return (8); | return (8); | ||||
break; | break; | ||||
case EM_RISCV: | case EM_RISCV: | ||||
▲ Show 20 Lines • Show All 387 Lines • Show Last 20 Lines |
OK obviously I got this one backwards.