public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
@ 2017-06-01 10:07 Sebastian Huber
  2017-06-01 10:42 ` Alan Modra
  0 siblings, 1 reply; 14+ messages in thread
From: Sebastian Huber @ 2017-06-01 10:07 UTC (permalink / raw)
  To: binutils

Hello,

I get the following errors using Binutils 2.28 on PowerPC for a bootloader program that is supposed to load an application image:

powerpc-rtems4.12-ld -o capture.ralf bootloader.o --just-symbols=capture.exe -b binary rtems.gz -T ppcboot.lds
bootloader.o: In function `start':
head.S:140:(.text+0x8a): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:141:(.text+0x8e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:157:(.text+0xb2): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:159:(.text+0xba): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `moved':
head.S:182:(.text+0xf2): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:229:(.text+0x152): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:230:(.text+0x156): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:257:(.text+0x16e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:259:(.text+0x176): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA
head.S:261:(.text+0x17e): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:262:(.text+0x182): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `reloc':
head.S:316:(.text+0x1de): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
head.S:330:(.text+0x206): dangerous relocation: generic linker can't handle R_PPC_SECTOFF_LO
bootloader.o: In function `exit':
misc.c:68:(.text.exit+0x28): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `zfree':
misc.c:101:(.text.zfree+0x14): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `zalloc':
misc.c:91:(.text.zalloc+0x2c): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:94:(.text.zalloc+0x58): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `hang':
misc.c:78:(.text.hang+0x44): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:83:(.text.hang+0x6c): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `gunzip':
misc.c:141:(.text.gunzip+0xf4): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:150:(.text.gunzip+0x124): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:156:(.text.gunzip+0x144): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:121:(.text.gunzip+0x194): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:152:(.text.gunzip+0x1a0): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:143:(.text.gunzip+0x1ac): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
misc.c:135:(.text.gunzip+0x1b8): dangerous relocation: generic linker can't handle R_PPC_PLTREL24
bootloader.o: In function `decompress_kernel':
misc.c:171:(.text.decompress_kernel+0x50): dangerous relocation: generic linker can't handle R_PPC_PLTREL24

This error is not present on the Git master of Binutils.  A Git bisect revealed this:

3ce512885ba76da53fae84cd1a555bc721fdd25e is the first bad commit
commit 3ce512885ba76da53fae84cd1a555bc721fdd25e
Author: Alan Modra <amodra@gmail.com>
Date:   Wed Jul 20 10:33:14 2016 +0930

    Mark some more powerpc relocs as not handled by generic linker
    
        * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_PLTREL32>): Put
        ppc64_elf_unhandled_reloc for special_function.
        * elf32-ppc.c (ppc_elf_howto_raw): Similarly for lots of relocs.

:040000 040000 14d4373b29d8869d265ad3cce13a3bf7c3c9b604 b3178f48ebaad5f02515811ad7bab72cd046716b M      bfd

I am now a bit unsure if this is an error in Binutils or our use of Binutils. If it was an error, how was it fixed in the meantime?


-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : [ http://lists.rtems.org/mailman/listinfo/devel | sebastian.huber at embedded-brains.de ] PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-05-27  8:43 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 10:07 Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA Sebastian Huber
2017-06-01 10:42 ` Alan Modra
2017-06-01 10:58   ` Sebastian Huber
2017-06-01 11:07     ` Sebastian Huber
2017-06-01 14:06       ` Alan Modra
2017-06-02  5:19         ` Sebastian Huber
     [not found]           ` <9a27522e-6a4e-ed0b-3ac4-cb30c027268d@embedded-brains.de>
2019-05-08  8:42             ` Alan Modra
2019-05-14 12:42               ` Sebastian Huber
2019-05-15  4:10                 ` Alan Modra
2019-05-16  9:29                   ` Sebastian Huber
2019-05-16 14:05                     ` Alan Modra
2019-05-17  5:20                       ` Sebastian Huber
2019-05-20  4:57                         ` Alan Modra
2019-05-27  8:43                           ` Sebastian Huber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).