[PATCH] D27303: [ELF] - Implemented R_386_16 and R_386PC16 relocations

Ed Maste via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 10:54:53 PST 2016


emaste added inline comments.


================
Comment at: ELF/Target.cpp:457-461
+  // A program or object file using R_386_8, R_386_16, R_386_PC16 or R_386_PC8
+  // relocations is not conformant to latest ABI. The R_386_16, and R_386_8
+  // relocations truncate the computed value to 16 - bits and 8 - bits
+  // respectively. Unfortunately R_386_PC16 and R_386_16 are used by some
+  // applications, for example by FreeBSD loaders.
----------------
I think this comment ought to be reworded slightly -- the boot loaders indeed do not conform to the latest i386 psABI. I think that will be true for any `.code16` assembly, as BIOS bootloaders must be.




https://reviews.llvm.org/D27303





More information about the llvm-commits mailing list