This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gold/arm: define $a/$d markers in .plt

>> I think you're conflating local to a relocatable object with local to
>> a load module. The downgrading of internal and hidden STB_GLOBAL
>> symbols to STB_LOCAL happens at the very end, so the symbols are
>> treated as local only by the dynamic loader. In every other respect,
>> the linker treats such symbols as global.
> In every other respect, except the very one that matters for
> relocation handling :-)

Sorry, I don't really understand the issue. You've explained that
dynamic relocations for STB_LOCAL symbols need to have st_value in
r_addend, and that you have a test for forced_local() in the
Scan::global() code. But that test is an assertion, which suggests
that you don't expect that to happen. If it does happen, why can't you
just arrange for the linker to write the relocation with the proper
value of r_addend? That may require some changes outside the sparc
target code, but it shouldn't be too difficult. Could it be as simple
as setting the is_symbolless attribute on the dynamic relocation
(which tells Output_reloc::write to use the symbol value for the

It doesn't seem to me that this is really a problem with downgrading
STB_GLOBAL symbols to STB_LOCAL, but an issue with writing the


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]