[llvm-bugs] [Bug 44860] New: Function symbol from assembler misses lowest bit set in Thumb mode
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Feb 9 13:43:14 PST 2020
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: unassignedbugs at nondot.org
Reporter: stefan at agner.ch
CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org,
Ties.Stuij at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200209/bbb45104/attachment.html>
More information about the llvm-bugs
mailing list