https://bugs.llvm.org/show_bug.cgi?id=44860
Bug ID: 44860
Summary: Function symbol from assembler misses lowest bit set
in Thumb mode
Product: libraries
Version: 10.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Backend: ARM
Assignee: unassignedb...@nondot.org
Reporter: ste...@agner.ch
CC: llvm-bugs@lists.llvm.org, peter.sm...@linaro.org,
ties.st...@arm.com
Created attachment 23113
--> https://bugs.llvm.org/attachment.cgi?id=23113&action=edit
reproducer assembly
Using the .type directive to mark a label as a function in Thumb mode does not
get the correct symbol table entry.
.syntax unified
.text
.thumb
__setup_mmu:
it ne
blne __setup_mmu
.type __setup_mmu, %function // Move this line before __setup_mmu for
correct behaviour.
llvm-mc --triple=armv7a-linux-gnueabihf blne.s -filetype=obj -o blne.o
--arm-add-build-attributes
llvm-readelf --symbols blne.o
Symbol table '.symtab' contains 3 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 NOTYPE LOCAL DEFAULT 2 $t.0
2: 00000000 0 FUNC LOCAL DEFAULT 2 __setup_mmu
This has been observed when trying to build Linux for 32-bit ARM in Thumb2
mode. When the object file gets linked, the linker inserts a blx instruction
which switches the CPU instruction set...
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs