bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/16924] PowerPC Relocation R_PPC_ADDR16 is using the wrong overfl


From: amodra at gmail dot com
Subject: [Bug ld/16924] PowerPC Relocation R_PPC_ADDR16 is using the wrong overflow checker
Date: Fri, 09 May 2014 23:56:52 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16924

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #4 from Alan Modra <amodra at gmail dot com> ---
Yes, 2.24 and earlier won't accept a plain unadorned "foo"..  Upgrade!

address@hidden bin-224]$ gas/as-new -a32 -o ori.o /src/tmp/ori.s
/src/tmp/ori.s: Assembler messages:
/src/tmp/ori.s:2: Error: unsupported relocation against foo

Mainline gives me:
address@hidden bin]$ gas/as-new -a32 -o ori.o /src/tmp/ori.s
address@hidden bin]$ ld/ld-new -melf32ppc -o ori ori.o --defsym foo=0xffff
ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000001800054
address@hidden bin]$ ld/ld-new -melf32ppc -o ori ori.o --defsym foo=-1
ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000001800054
ori.o:(.text+0x2): relocation truncated to fit: R_PPC_ADDR16 against symbol
`foo' defined in *ABS* section in ori
address@hidden bin]$ ld/ld-new -melf32ppc -o ori ori.o --defsym foo=0x10000
ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000001800054
ori.o:(.text+0x2): relocation truncated to fit: R_PPC_ADDR16 against symbol
`foo' defined in *ABS* section in ori

It isn't necessary to do anything special with oris etc.  A properly written
program won't use ADDR16 relocs with oris, but instead will use ADDR16_HI.
ADDR16_HI doesn't report overflow on ppc32.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]