bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/21703] The first symbol definition is overwritten by second defi


From: renlin.li at arm dot com
Subject: [Bug ld/21703] The first symbol definition is overwritten by second definition when --allow-multiple-definition is provieded
Date: Tue, 04 Jul 2017 19:41:36 +0000

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

--- Comment #6 from Renlin Li <renlin.li at arm dot com> ---
I create a test case to show the bug.

arm-none-eabi-gcc main_arm.c -O2 -march=armv7-a -mfloat-abi=softfp
-specs=aprofile-validation.specs -c -o main_arm.o
arm-none-eabi-gcc  -O2 -mthumb -march=armv7-a -mfloat-abi=softfp
-specs=aprofile-validation.specs -c foo_arm.c -o foo_arm.o
arm-none-eabi-gcc  -O2 -mthumb -march=armv7-a -mfloat-abi=softfp
-specs=aprofile-validation.specs -c foo_thumb.c -o foo_thumb.o

arm-none-eabi-gcc main_arm.o foo_thumb.o foo_arm.o
-specs=aprofile-validation.specs  -o main.exe  -Wl,--allow-multiple-definition

In this case, we would expect in main.exe, the function get called is the thumb
version, and BLX is used to do the function call.

But BL is used to call the thumb function.
I have checked weak symbol and dynamic symbol are properly handled.

-- 
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]