[patch][gold] Fix R_ARM_TLS_LE32 when there is no TLS segment

Rafael Espindola espindola@google.com
Thu May 27 04:45:00 GMT 2010

> 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? :-)

> Ian

Rafael Ávila de Espíndola

More information about the Binutils mailing list