[ld-new] gold patch committed: Handle LDO_32 following LDM

Cary Coutant ccoutant@google.com
Wed Oct 7 00:57:00 GMT 2009


>> But output_section->flags() is readily available in
>> Relocate::relocate() -- wouldn't that do?  Why not just pass
>> output_section -- or (output_section->flags() & elfcpp::SHF_EXECINSTR)
>> -- to relocate_tls()?
>
> What matters is not the flags of the output section, but the flags of
> the input section.  That is, I'm concerned about crazy people using
> linker scripts.  It wouldn't actually be that hard to pass the flags
> down from Sized_relobj::relocate_sections, perhaps stuffing them in
> Relocate_info.  Do you think it's worth it?

Yes, I think adding the flags to Relocate_info would be much cleaner.
(I don't have much sympathy, though, for anyone who puts an executable
input section into a non-executable output section, but I guess we
should support that.)

I was thinking another approach might be to set a flag if we see the
TLS_LDM relocation during Scan, but we don't really have a convenient
channel to convey that flag from Scan to Relocate.

-cary



More information about the Binutils mailing list