bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/31407] New: ld arm: fdpic link may have null pointer dereference


From: i at maskray dot me
Subject: [Bug ld/31407] New: ld arm: fdpic link may have null pointer dereference in allocate_dynrelocs_for_symbol
Date: Sat, 24 Feb 2024 04:07:08 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=31407

            Bug ID: 31407
           Summary: ld arm: fdpic link may have null pointer dereference
                    in allocate_dynrelocs_for_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: ---

Noticed while investigating the behavior of .rofixup

% cat a.s
.globl foo
foo:
  bx lr

.data
.long foo

% ./bin/as-new --fdpic a.s -o a.o && ./bin/ld-new -m armelf_linux_fdpiceabi a.o
-o a
./bin/ld-new: warning: a.o: missing .note.GNU-stack section implies executable
stack
./bin/ld-new: NOTE: This behaviour is deprecated and will be removed in a
future version of the linker
[1]    3777145 segmentation fault  ./bin/ld-new -m armelf_linux_fdpiceabi a.o
-o a


(gdb) bt
#0  0x00005555556f9220 in allocate_dynrelocs_for_symbol (h=0x5555557d5348,
inf=0x5555557acf80 <link_info>) at ../../../bfd/elf32-arm.c:16704
#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=0x7fffffffd3
68) 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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]