Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jul 2020 19:53:03 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 247724] ld-elf.so.1: Unsupported relocation type 42 in non-PLT relocations [clang, llvm-devel-11.0.d20200519]
Message-ID:  <bug-247724-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247724

            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@FreeBSD.org
          Reporter: nicholas.h.briggs@gmail.com
 Attachment #216152 text/plain
         mime type:

Created attachment 216152
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D216152&action=
=3Dedit
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=20
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 relocat=
ions

$ readelf -r ifunc

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

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-247724-227>