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

            Bug ID: 36923
           Summary: R_X86_64_32S: error while loading shared libraries:
                    unexpected reloc type 0x0b
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Created attachment 20136
  --> https://bugs.llvm.org/attachment.cgi?id=20136&action=edit
test.cc that reproduces the problem

Lld generated binary has R_X86_64_32S in dynamic relocation section, which is
wrong and rejected by dynamic loader at launch time:

"error while loading shared libraries: unexpected reloc type 0x0b"

I have an attachment that reproduces:

>> clang++ -fuse-ld=lld -O2 -pie -Wl,-z,notext -O2 test.cc
>> readelf -WDr a.out 

'RELA' relocation section at offset 0x550 contains 288 bytes:
    Offset             Info             Type               Symbol's Value 
Symbol's Name + Addend
... ...
0000000000001150  0000000a0000000b R_X86_64_32S           0000000000001280
closedir@GLIBC_2.2.5 + 0
0000000000001177  0000000a0000000b R_X86_64_32S           0000000000001280
closedir@GLIBC_2.2.5 + 0

>> ./a.out 
./a.out: error while loading shared libraries: unexpected reloc type 0x0b

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to