This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
relocations targeting discarded symbols
- From: "Jan Beulich" <JBeulich at novell dot com>
- To: "Alan Modra" <amodra at bigpond dot net dot au>
- Cc: <binutils at sourceware dot org>
- Date: Mon, 25 May 2009 14:17:25 +0100
- Subject: relocations targeting discarded symbols
Alan,
as you seem to be the last one who touched that code (when moving it from
elflink.h to elflink.c), and since I cannot seem to find a way to look at the
history of elflink.h - what are the reasons behind
if (irela->r_offset >= (bfd_vma) -2)
{
/* This is a reloc for a deleted entry or somesuch.
Turn it into an R_*_NONE reloc, at the same
offset as the last reloc. elf_eh_frame.c and
bfd_elf_discard_info rely on reloc offsets
being ordered. */
irela->r_offset = last_offset;
irela->r_info = 0;
irela->r_addend = 0;
continue;
}
In particular,
- Why can't such relocations just be discarded?
- Why does r_offset need to be changed? I can't see why keeping the old
offset would clobber the ordering (or prevent it from being established)
here.
Thanks, Jan