[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/31408] New: ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC
From: |
i at maskray dot me |
Subject: |
[Bug ld/31408] New: ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC referencing a hidden symbol |
Date: |
Sat, 24 Feb 2024 06:53:39 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=31408
Bug ID: 31408
Summary: ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC
referencing a hidden symbol
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
% cat a.c
__attribute__((visibility("hidden"))) void fun_hidden();
void *fun_hidden_addr() { return fun_hidden; }
% ./bin/ld-new -m armelf_linux_fdpiceabi a.o
[1] 3819239 segmentation fault ./bin/ld-new a.o
% ./bin/ld-new -m armelf_linux_fdpiceabi -shared a.o
./bin/ld-new: BFD (GNU Binutils) 2.42.50.20240224 internal error, aborting at
../../../bfd/elf32-arm.c:16466 in allocate_dynrelocs_for_symbol
./bin/ld-new: Please report this bug.
If fun_hidden is defined, -shared will suceed while -no-pie still segfaults.
(gdb) bt
#0 allocate_dynrelocs_for_symbol (h=0x5555557d5430, inf=0x5555557acf80
<link_info>) at ../../../bfd/elf32-arm.c:16474
#1 0x00005555556e6892 in bfd_link_hash_traverse
(htab=htab@entry=0x5555557d4950, func=func@entry=0x5555556f8ba0
<allocate_dynrelocs_for_symbol>, info=info@entry=0x5555557acf80 <link_info>) at
../../../bfd/linker.c:674
#2 0x000055555570dc8b in elf_link_hash_traverse (info=0x5555557acf80
<link_info>, f=0x5555556f8ba0 <allocate_dynrelocs_for_symbol>,
table=0x5555557d4950) at ../../../bfd/elf-bfd.h:787
#3 elf32_arm_size_dynamic_sections (output_bfd=0x5555557d2830,
info=0x5555557acf80 <link_info>) at ../../../bfd/elf32-arm.c:16986
#4 0x0000555555738ba9 in bfd_elf_size_dynamic_sections (output_bfd=<optimized
out>, soname=<optimized out>, rpath=rpath@entry=0x0, filter_shlib=0x0,
audit=audit@entry=0x0, depaudit=0x0, auxiliary_filters=0x0, info=0x5555557acf80
<link_info>,
sinterpptr=0x7fffffffd388) at ../../../bfd/elflink.c:7488
#5 0x00005555556d803b in ldelf_before_allocation (audit=<optimized out>,
depaudit=<optimized out>, default_interpreter_name=0x0) at
../../../ld/ldelf.c:1839
#6 0x00005555556bfb9b in lang_process () at ../../../ld/ldlang.c:8423
#7 0x00005555556c4680 in main (argc=<optimized out>, argv=<optimized out>) at
../../../ld/ldmain.c:504
16468│ /* We only allocate one function descriptor with its associated
16469│ relocation. */
16470│ if (eh->fdpic_cnts.funcdesc_offset == -1)
16471│ {
16472│ asection *s = htab->root.sgot; ///////// s is null
16473│
16474│ eh->fdpic_cnts.funcdesc_offset = s->size;
16475│ s->size += 8;
PR31407 is a similar bug failing on another line in
allocate_dynrelocs_for_symbol
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/31408] New: ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC referencing a hidden symbol,
i at maskray dot me <=