https://bugs.llvm.org/show_bug.cgi?id=44929

            Bug ID: 44929
           Summary: [arm] After 2bfee35cb86, "unsupported relocation on
                    symbol"
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: Windows 2000
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: new bugs
          Assignee: unassignedb...@nondot.org
          Reporter: dimi...@andric.com
                CC: htmldevelo...@gmail.com, llvm-bugs@lists.llvm.org

After
https://github.com/llvm/llvm-project/commit/2bfee35cb860859b436de0b780fbd00d68e198a4
("[MC][ELF] Emit a relocation if target is defined in the same section and is
non-local"), the following assembly for arm no longer compiles:

# clang -target armv6-gnueabihf -c adr-reloc.s
adr r0, foo
.global foo
foo:

Before:

$ clang-llvmorg-10-init-17163-g241f330d6ba -target armv6-gnueabihf-freebsd13.0
-c adr-reloc.s

$ llvm-objdump -d adr-reloc.o

adr-reloc.o:    file format ELF32-arm-little


Disassembly of section .text:

00000000 $a.0:
       0: 04 00 4f e2                   sub     r0, pc, #4

After:

$ clang-llvmorg-10-init-17164-g2bfee35cb86 -target armv6-gnueabihf -c
adr-reloc.s
adr-reloc.s:2:1: error: unsupported relocation on symbol
adr r0, foo
^

This is a regression.

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

Reply via email to