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!

[alan@squeak 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:
[alan@squeak bin]$ gas/as-new -a32 -o ori.o /src/tmp/ori.s
[alan@squeak bin]$ ld/ld-new -melf32ppc -o ori ori.o --defsym foo=0xffff
ld/ld-new: warning: cannot find entry symbol _start; defaulting to
0000000001800054
[alan@squeak 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
[alan@squeak 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.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to