| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
Can look into how ARM parses "llvm/BinaryFormat/ELFRelocs/ARM.def" to create the list of relocations? This helps our relocation list to never get stale.
Sorry, something went wrong.
Great comment. Thanks for bringing this up! |
Sorry, something went wrong.
Add the relocation layer for i386 links: R_386_NONE, R_386_8, R_386_16, and R_386_32. Unlike x86-64, i386 uses Elf32_Rel rather than Elf64_Rela. The addend is stored in the field being relocated, so it must be read and sign-extended from that field width before evaluating S + A. Normalize the result to the 32-bit ELF address space before checking narrow fields and writing the result back. This preserves valid full-width 32-bit bit patterns, including addresses with bit 31 set, while rejecting values that cannot be encoded in 8- or 16-bit fields. Signed-off-by: Bhoumik Patidar <bpatidar@qti.qualcomm.com>
Thanks for highlighting this. I have updated the code to use i386.def to populate the reloc names and IDs. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Add the relocation layer for i386 links: R_386_NONE, R_386_8, R_386_16, and R_386_32.
Unlike x86-64, i386 uses Elf32_Rel rather than Elf64_Rela. The addend is stored in the field being relocated, so it must be read and sign-extended from that field width before evaluating S + A. Normalize the result to the 32-bit ELF address space before checking narrow fields and writing the result back. This preserves valid full-width 32-bit bit patterns, including addresses with bit 31 set, while rejecting values that cannot be encoded in 8- or 16-bit fields.
Resolves #2028
Progress on #1961