This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[applied ld mips patch] tweak --embedded-relocs sectionchecking
- From: cgd at broadcom dot com
- To: binutils at sources dot redhat dot com
- Cc: cgd at broadcom dot com
- Date: Tue, 18 Jun 2002 22:37:59 -0700 (PDT)
- Subject: [applied ld mips patch] tweak --embedded-relocs sectionchecking
applied as obvious-to-me-and-nobody-else-cares-a-bit-about-this-code. 8-)
previous check was from the mipsecoff code. in retrospect, the check from
the m68kelf code was better.
(People should really check mips*-elf targets when making large changes,
so they verify that at least they don't break the few existing tests...)
2002-06-18 Chris Demetriou <cgd@broadcom.com>
* emultempl/mipself.em (mips_elf${ELFSIZE}_check_sections): Check
section flags for SEC_DATA, rather than for SEC_CODE being unset.
Index: emultempl/mipself.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/mipself.em,v
retrieving revision 1.2
diff -u -p -r1.2 mipself.em
--- emultempl/mipself.em 19 Jun 2002 01:52:52 -0000 1.2
+++ emultempl/mipself.em 19 Jun 2002 05:29:16 -0000
@@ -121,7 +121,7 @@ mips_elf${ELFSIZE}_check_sections (abfd,
asection *sec;
PTR sdatasec;
{
- if ((bfd_get_section_flags (abfd, sec) & SEC_CODE) == 0
+ if ((bfd_get_section_flags (abfd, sec) & SEC_DATA)
&& sec != (asection *) sdatasec
&& sec->reloc_count != 0)
einfo ("%B%X: section %s has relocs; cannot use --embedded-relocs\n",