[Nasm-bugs] [Bug 3392533] Considerations for segment support in ELF

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Sat Jul 13 07:28:47 PDT 2019


--- Comment #27 from TK Chia <u1049321969 at caramail.com> ---
Hello hpa, hello stsp,

Over the last two weeks or so I had been trying to get the gcc-ia16 toolchain
to emit the "...!" auxiliary symbols and sections for your proposed SEGELF
system (https://bugzilla.nasm.us/show_bug.cgi?id=3392533#c20), but have not
been very successful.

The problem --- from what I see --- is that, even if binutils, gas, or even gcc
knows that there is a symbol X in some section S (or S$), and there is a
relocation for X at some place L, it turns out to be surprisingly hard to get
binutils/gas/gcc to magically define a relocation for a "related" symbol X! in
a different section S!.

It seems generally easier to stack additional relocations at L for the _same_
symbol X.

(This is mainly because symbols and sections generally appear internally as
indices or tree structures rather than strings.  The GCC middle-end's byzantine
handling of section names does not help either --- it is not very easy for the
ia16 back-end to figure out which ELF section a define function or variable
will go into.)

Thank you!

You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.

More information about the Nasm-bugs mailing list