This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch][gold] Fix R_ARM_TLS_LE32 when there is no TLS segment
Rafael Espindola <espindola@google.com> writes:
>> I gather that native client is using a linker script which uses a
>> PHDRS clause.
>
> That is correct.
>
>> ÂIs there any chance you can just have that linker
>> script have a TLS segment, even if native client isn't going to use
>> it?
>
> I can add one, but I would still need this patch. I tried adding
>
> tls PT_TLS FLAGS(4) ;
>
> The problem is that with no data assigned to it, things like
> maximum_alignment() will be wrong. If I try to assign tdata and tbss
> to it by using "} : tls", I get
>
> ld: error: allocated section not in any PT_LOAD segment
>
> gnu ld gives me a warning, so I assume there is some other way to
> assign to the tls segment? :-)
You need to put tdata and tbss in both the data and tls segments. You
need something like
} :data :tls
Ian