Skip to contentSkip to conversation

Linker Error with binutils-2.21

U-Boot James Kosin 2 participants 3 messages Jan 28, 2011

lore
Share & tools
lore
#0 lore raw

NOTICE:

The new binutils-2.21 is not allowing -r -shared to be used together. I'd have to look at the options; but, I've attached a log below with the error.

James Kosin

--- Log ---

Quoted 28 lines

make[1]: Entering directory `/home/jkosin/git/u-boot/examples/standalone'
arm-eabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DCONF
IG_SYS_TEXT_BASE=0x10000000 -I/home/jkosin/git/u-boot/include -fno-builtin -ffre
estanding -nostdinc -isystem /home/jkosin/opt/armThumb-4.5.0/lib/gcc/arm-eabi/4. 5.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-in
terwork -march=armv4 -Wall -Wstrict-prototypes -fno-stack-protector -fno-topleve
l-reorder -o hello_world.o hello_world.c -c
arm-eabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DCONF
IG_SYS_TEXT_BASE=0x10000000 -I/home/jkosin/git/u-boot/include -fno-builtin -ffre
estanding -nostdinc -isystem /home/jkosin/opt/armThumb-4.5.0/lib/gcc/arm-eabi/4. 5.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-in
terwork -march=armv4 -Wall -Wstrict-prototypes -fno-stack-protector -fno-topleve
l-reorder -o stubs.o stubs.c -c
arm-eabi-ld -pie -r -o libstubs.o stubs.o
arm-eabi-ld: -r and -shared may not be used together
make[1]: *** [libstubs.o] Error 1
make[1]: Leaving directory `/home/jkosin/git/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2

Signature · 9 lines
James Kosin
Senior Software Engineer

International Communications Group, Inc.
230 Pickett's Line
Newport News, Virginia  23603

Phone: +1 (757) 947-1030 x 122
Fax:   +1 (757) 947-1035
#1 lore raw

More information:

  -r, -i, --relocatable       Generate relocatable output

-shared, -Bshareable Create a shared library
-pie, --pic-executable Create a position independent executable

Isn't the fact we pass -pie and -r a bit redundant, especially when creating a library??

James

Quoted 37 lines · James Kosin

NOTICE:

The new binutils-2.21 is not allowing -r -shared to be used together. I'd have to look at the options; but, I've attached a log below with the error.

James Kosin

--- Log ---

Quoted 28 lines

make[1]: Entering directory `/home/jkosin/git/u-boot/examples/standalone'
arm-eabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DCONF
IG_SYS_TEXT_BASE=0x10000000 -I/home/jkosin/git/u-boot/include -fno-builtin -ffre
estanding -nostdinc -isystem /home/jkosin/opt/armThumb-4.5.0/lib/gcc/arm-eabi/4. 5.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-in
terwork -march=armv4 -Wall -Wstrict-prototypes -fno-stack-protector -fno-topleve
l-reorder -o hello_world.o hello_world.c -c
arm-eabi-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
-D__KERNEL__ -DCONF
IG_SYS_TEXT_BASE=0x10000000 -I/home/jkosin/git/u-boot/include -fno-builtin -ffre
estanding -nostdinc -isystem /home/jkosin/opt/armThumb-4.5.0/lib/gcc/arm-eabi/4. 5.2/include -pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux -mno-thumb-in
terwork -march=armv4 -Wall -Wstrict-prototypes -fno-stack-protector -fno-topleve
l-reorder -o stubs.o stubs.c -c
arm-eabi-ld -pie -r -o libstubs.o stubs.o
arm-eabi-ld: -r and -shared may not be used together
make[1]: *** [libstubs.o] Error 1
make[1]: Leaving directory `/home/jkosin/git/u-boot/examples/standalone'
make: *** [examples/standalone] Error 2

#2 lore raw

Hi James,

Please refrain from top-posting.

Le 28/01/2011 15:49, James Kosin a ?crit :

Quoted 7 lines

More information:

   -r, -i, --relocatable       Generate relocatable output

-shared, -Bshareable Create a shared library
-pie, --pic-executable Create a position independent executable

Quoted 13 lines

Isn't the fact we pass -pie and -r a bit redundant, especially when creating a library??

James

Quoted 7 lines · James Kosin

NOTICE:

The new binutils-2.21 is not allowing -r -shared to be used together. I'd have to look at the options; but, I've attached a log below with the error.

James Kosin

This has been fixed yesterday; you can cherry-pick Stefano's commit from the tip of u-boot-arm/master.

Amicalement,

Signature · 1 line
Albert.