[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/28902] New: ld: `not found for insert` error has a weird orderin
From: |
i at maskray dot me |
Subject: |
[Bug ld/28902] New: ld: `not found for insert` error has a weird ordering |
Date: |
Thu, 17 Feb 2022 01:48:23 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=28902
Bug ID: 28902
Summary: ld: `not found for insert` error has a weird ordering
Product: binutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: i at maskray dot me
Target Milestone: ---
echo 'SECTIONS { .byte : { BYTE(0) } } INSERT AFTER .data;' > insert-data.lds
echo 'SECTIONS { .text : {*(.text)} .data : {*(.data)}}' > a.lds
echo 'SECTIONS { .byte : { BYTE(0) } } INSERT AFTER .note.gnu.build-id;' >
insert-note.lds
echo '.globl _start; _start:; .data; .byte 0' | gcc -c -x assembler - -o a.o
exit
ld.bfd a.o -T insert-data.lds -T a.lds # ok
ld.bfd a.o -T a.lds -T insert-data.lds # .data not found for insert
# Remark: The order is puzzling. If ld processes -T in order, one will expect
that `-T a.lds -T insert-data.lds` works and the other order fails.
ld.bfd a.o -T insert-note.lds --build-id # ok
ld.bfd a.o -T a.lds -T insert-note.lds --build-id # .note.gnu.build-id not
found for insert
ld.bfd a.o -T a.lds -dT insert-note.lds --build-id # ok
# Remark: Why -T fails while -dT works is puzzling. If you specify --verbose,
the used linker script is exactly the same.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/28902] New: ld: `not found for insert` error has a weird ordering,
i at maskray dot me <=