This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Binutils 2.28 on PowerPC: dangerous relocation: generic linker can't handle R_PPC_SECTOFF_HA


Hello Alan,

On 20/05/2019 06:57, Alan Modra wrote:
On Fri, May 17, 2019 at 07:20:39AM +0200, Sebastian Huber wrote:
On 16/05/2019 16:05, Alan Modra wrote:
My point was that sym@sectoff@l and sym@sectoff@ha are exactly the
same as sym@l and sym@ha respectively when sym is SHN_ABS.  It's fine
to use @sectoff with symbols for addresses within output sections, but
symbols representing the size of multiple output sections really
shouldn't be @sectoff.
The problem is that if I change it to sym@ha and sym@l, then I get this
assembler error:

     lis    r3,__size@ha
     addi    r3,r3,__size@l

bsps/powerpc/motorola_powerpc/bootloader/head.S: Assembler messages:
bsps/powerpc/motorola_powerpc/bootloader/head.S:151: Error: relocation
cannot be done when using -mrelocatable
bsps/powerpc/motorola_powerpc/bootloader/head.S:152: Error: relocation
cannot be done when using -mrelocatable
Hmm, that's the first I knew you were assembling with -mrelocatable
(or noticed, if you said so).  Oh well, that makes my comment about
@sectoff wrong.  Looks like you should continue using @sectoff and
put __size = ABSOLUTE (.); in the script.

thanks for your kind help and patience. It was quite easy to fix in the end:

https://git.rtems.org/rtems/commit/?id=f419349a1370ffed9cb3d2322d01e801e012134e

--
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  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]