From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: baford@snake.cs.utah.edu Cc: vax@linkdead.paranoia.com, gas2@cygnus.com Subject: Re: fixing i386 gas for 16-bit code Date: Thu, 20 Jun 1996 12:16:00 -0000 Message-id: <199606201916.PAA08087@sanguine.cygnus.com> References: <199606201825.MAA17992@snake.cs.utah.edu> X-SW-Source: 1996/msg00047.html Date: Thu, 20 Jun 96 12:25:13 MDT From: Bryan Ford True, although there is one separate but related problem, if you're using ELF format... The current ELF tools (maybe the i386 ELF format period, I don't know) don't seem to support 16-bit relocations in object files; the assembler just dies with an error. This can usually be worked around by either just using 32-bit addresses in cases in which relocations are needed, or, in single-file "programs" such as boot blocks and such, just writing the code so that the assembler does the relocating rather than the linker - e.g., say "foo-_start" rather than just "foo". However, fixing this properly presumably would involve BFD hacking. The BFD side of this is quite trivial: in elf32-i386.c, add an entry to enum reloc_type, elf_howto_table, and elf_i386_reloc_type_lookup. Of course, you then have to worry about the fact that your object files violate the ELF ABI. Ian