[Bug 247724] ld-elf.so.1: Unsupported relocation type 42 in non-PLT relocations [clang, llvm-devel-11.0.d20200519]

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jul 2 19:53:04 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247724

            Bug ID: 247724
           Summary: ld-elf.so.1: Unsupported relocation type 42 in non-PLT
                    relocations [clang, llvm-devel-11.0.d20200519]
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs at FreeBSD.org
          Reporter: nicholas.h.briggs at gmail.com
 Attachment #216152 text/plain
         mime type:

Created attachment 216152
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=216152&action=edit
C source test case

The attached test case, ifunc.c (a test case from valgrind) compiled with

$ clang-devel --version
clang version 11.0.0 
Target: i386-portbld-freebsd12.1
Thread model: posix
InstalledDir: /usr/local/llvm-devel/bin

(package info: llvm-devel-11.0.d20200519)

$ clang-devel -o ifunc ifunc.c

generates:

$ ./ifunc
ld-elf.so.1: [...]/ifunc: Unsupported relocation type 42 in non-PLT relocations

$ readelf -r ifunc

Relocation section (.rel.dyn):
r_offset r_info   r_type              st_value st_name
00403918 0000002a R_386_IRELATIVE     00000000 

Relocation section (.rel.plt):
r_offset r_info   r_type              st_value st_name
00403908 00000307 R_386_JUMP_SLOT     004017e0 _init_tls
0040390c 00000607 R_386_JUMP_SLOT     004017f0 exit
00403910 00000407 R_386_JUMP_SLOT     00401800 atexit
00403914 00000707 R_386_JUMP_SLOT     00401810 printf

The same code compiled with clang8 (default compiler on 12.1-RELEASE) shows

$ readelf -r ifunc

Relocation section (.rel.plt):
r_offset r_info   r_type              st_value st_name
0040201c 00000307 R_386_JUMP_SLOT     00401380 _init_tls
00402020 00000607 R_386_JUMP_SLOT     00401390 exit
00402024 00000407 R_386_JUMP_SLOT     004013a0 atexit
00402028 00000707 R_386_JUMP_SLOT     004013b0 printf
0040202c 0000002a R_386_IRELATIVE     00000000

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list