[Nasm-bugs] [Bug 3392533] Considerations for segment support in ELF
noreply-nasm at gorcunov.org
noreply-nasm at gorcunov.org
Mon Jul 29 22:16:59 PDT 2019
https://bugzilla.nasm.us/show_bug.cgi?id=3392533
--- Comment #67 from TK Chia <u1049321969 at caramail.com> ---
Hello hpa,
> I do have one question: would it be correct to assume that gcc knows the
> list of external symbols that are referenced outside the module? Since gas
> doesn't have, or at least doesn't need, an extern directive, it would be
> useful if gcc would emit .weak directives for the corresponding ! symbols
> (only really needed for mixed mode programming, but still...)
Yes, I think so. But it all seems to me that it is just adding unneeded
complexity on top of an already complex solution to what is, at heart, a rather
simple problem.
Basically we just need to apply an adjustment to each R_386_{8, 16, 32, PC8,
PC16, PC32} that will be produced.
The best time to do that is when the toolchain is about to produce the
relocations themselves — rather than trying to intuit at the GCC level whether
this "foo" reference in the midst of some expression tree will appear as an
R_386_PC8 etc.
And this is what my code is trying to achieve.
--
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