diff options
author | Alan Modra <amodra@gmail.com> | 2007-10-31 07:40:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-10-31 07:40:11 +0000 |
commit | ebc056ca1b4add6e9658353f339e71db7c69890c (patch) | |
tree | 1effd30cb7fb51297961f022baea495699aa17e2 /binutils | |
parent | 8f317e316924d673e4e685c88b202e845f4b0f79 (diff) | |
download | gdb-ebc056ca1b4add6e9658353f339e71db7c69890c.zip gdb-ebc056ca1b4add6e9658353f339e71db7c69890c.tar.gz gdb-ebc056ca1b4add6e9658353f339e71db7c69890c.tar.bz2 |
* readelf.c (debug_apply_rela_addends): Clarify FIXME.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/readelf.c | 15 |
2 files changed, 11 insertions, 8 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 2f50eff..abd9a96 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2007-10-31 Alan Modra <amodra@bigpond.net.au> + + * readelf.c (debug_apply_rela_addends): Clarify FIXME. + 2007-10-29 Nick Clifton <nickc@redhat.com> * readelf.c (is_32bit_abs_reloc): Add knowledge of reloc used by diff --git a/binutils/readelf.c b/binutils/readelf.c index 724e5f0..9ae0779 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -8242,14 +8242,13 @@ debug_apply_rela_addends (void *file, continue; } - if (is_32bit_pcrel_reloc (reloc_type)) - /* FIXME: Not sure how to apply a pc-rel reloc yet. - I think that it ought to be: - (rp->r_addend + sym->st_value) - rp->r_offset - but this breaks GAS CFI tests... */ - byte_put (loc, (rp->r_addend + sym->st_value) /*- rp->r_offset*/, reloc_size); - else - byte_put (loc, rp->r_addend + sym->st_value, reloc_size); + /* FIXME. We apply pcrel relocs as if they were absolute, + ie. without subtracting the pc. This is to suit + display_debug_frames which does not add the pc even + though it ought to for DW_EH_PE_pcrel FDEs. Removing + the hack in display_debug_frames will require that we + apply rel relocs too. */ + byte_put (loc, rp->r_addend + sym->st_value, reloc_size); } free (symtab); |