PPC64 GOT alignment trouble

Andrew Stubbs ams@codesourcery.com
Fri Oct 16 16:21:00 GMT 2015


On 15/10/15 15:21, Alan Modra wrote:
> Not as it is.  I'm a little worried that the warning will trigger when
> it shouldn't, and the patch looks to be a bit of a rush job (testing
> adjust != 0 is better and it would also be better to use
> TOC_BASE_ALIGN in the warning message rather than hard coding 256).
> BTW, I'm on vacation tomorrow (huh, today, it's well past midnight),
> so probably will be "ignoring" you until Monday.

This version should address the issues with the text.

It's true that the warning can trigger in cases where there is not 
actually a serious problem (i.e. the r2 register gets set up correctly, 
even though the section is not aligned).

Given that this problem is likely to bite every PPC64 Linux user if they 
happen to upgrade binutils before the kernel, and who-knows-how-many 
other hidden projects, I'm inclined to lean toward adding the warning.

Even in the "harmless warning" cases, it would benefit the user to apply 
the alignment, both to prevent wasteful padding in the binary, and to 
preserve the maximum addressable GOT capacity (albeit those are minor wins).

I don't see that we can actually get a "false positive" here; the 
message will be accurate, even when not helpful.

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sb-6017.patch
Type: text/x-patch
Size: 927 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20151016/6a6eb60d/attachment.bin>


More information about the Binutils mailing list