[PATCH][M68K] Binutils support for TLS
Maxim Kuvyrkov
maxim@codesourcery.com
Sun Jan 25 12:55:00 GMT 2009
Andreas Schwab wrote:
> Maxim Kuvyrkov <maxim@codesourcery.com> writes:
>
>> + /* Check if we should switch to negative range of the offsets. */
>> + if (arg->offset1[got_offset_size] + entry_size
>> + > arg->offset2[got_offset_size])
>> + {
>> + /* Verify that this is the only switch to negative range for
>> + got_offset_size. */
>> + BFD_ASSERT (arg->use_neg_got_offsets_p
>> + && (arg->offset2[got_offset_size]
>> + != arg->offset2[- got_offset_size - 1]));
>> +
>> + /* Switch. */
>> + arg->offset1[got_offset_size] = arg->offset1[-got_offset_size - 1];
>> + arg->offset2[got_offset_size] = arg->offset2[-got_offset_size - 1];
>
> I'm getting an assertion failures when running the linker tests. You
> need to initialize arg_.use_neg_got_offsets_p before calling
> hash_traverse in elf_m68k_finalize_got_offsets.
Andreas, thanks for looking at the TLS patches.
It is better to just remove this field as it is not very useful now. To
keep the assert and make it reliable, it is enough to set
arg->offset2[-N] to the values of arg->offset2[N] when negative offsets
are not used.
The attached patch does the above and should fix the problem (I say
"should" because I couldn't reproduce the bug on my system ;) ).
> Furthermore, the
> underlying type of an enum may be unsigned, so you need to cast to int
> before negating it.
Dully fixed by the attached patch.
--
Maxim
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-nptl-binutils-1.patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20090125/3a491a21/attachment.ksh>
More information about the Binutils
mailing list