* [patch RFA] Do nothing in debug_apply_rela_addends for SH
@ 2007-03-23 12:45 Kaz Kojima
2007-03-23 14:23 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Kaz Kojima @ 2007-03-23 12:45 UTC (permalink / raw)
To: binutils
Hi,
PR gas/3811 was caught with the cfi-common-6 test and turned
out an SH specific problem of readelf.
readelf loads the .eh_frame section and fixes the contents
according to rela addends with debug_apply_rela_addends when
the target uses RELA. Although SH uses RELA relocations,
it doesn't use their addend fields and uses in place values.
This makes debug_apply_rela_addends confused. The attached
patch is to fix it. Tested on i686-pc-linux-gnu and sh4-
unknown-linux-gnu with no new regressions.
Regards,
kaz
--
2007-03-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
PR gas/3811
* readelf.c (debug_apply_rela_addends): Do nothing for SH.
diff -uprN ORIG/src/binutils/readelf.c LOCAL/src/binutils/readelf.c
--- ORIG/src/binutils/readelf.c 2007-03-22 11:58:55.000000000 +0900
+++ LOCAL/src/binutils/readelf.c 2007-03-23 08:07:03.000000000 +0900
@@ -7803,6 +7803,10 @@ debug_apply_rela_addends (void *file,
if (!is_relocatable)
return 1;
+ /* SH uses RELA but uses in place value instead of the addend field. */
+ if (elf_header.e_machine == EM_SH)
+ return 0;
+
for (relsec = section_headers;
relsec < section_headers + elf_header.e_shnum;
++relsec)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch RFA] Do nothing in debug_apply_rela_addends for SH
2007-03-23 12:45 [patch RFA] Do nothing in debug_apply_rela_addends for SH Kaz Kojima
@ 2007-03-23 14:23 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2007-03-23 14:23 UTC (permalink / raw)
To: Kaz Kojima; +Cc: binutils
Hi Kaz,
> 2007-03-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
>
> PR gas/3811
> * readelf.c (debug_apply_rela_addends): Do nothing for SH.
Approved - please apply.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-23 14:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-23 12:45 [patch RFA] Do nothing in debug_apply_rela_addends for SH Kaz Kojima
2007-03-23 14:23 ` Nick Clifton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).