diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-10-05 18:56:03 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-10-05 18:56:03 +0000 |
commit | 227db17e6c9af0fd69bdc95925a484f667c6ede7 (patch) | |
tree | 73a021a8138cb1e2094dd745848e884946333996 /sys-devel | |
parent | Add ppc-bfd.patch to fix ppc issues, bug #28011. Remove bfd-elf-interp.patch, (diff) | |
download | gentoo-2-227db17e6c9af0fd69bdc95925a484f667c6ede7.tar.gz gentoo-2-227db17e6c9af0fd69bdc95925a484f667c6ede7.tar.bz2 gentoo-2-227db17e6c9af0fd69bdc95925a484f667c6ede7.zip |
Add ppc-bfd.patch to fix ppc issues, bug #28011. Remove bfd-elf-interp.patch,
as it breaks section attibutes as in
http://gcc.gnu.org/ml/gcc/2003-10/msg00141.html.
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/binutils/ChangeLog | 11 | ||||
-rw-r--r-- | sys-devel/binutils/Manifest | 4 | ||||
-rw-r--r-- | sys-devel/binutils/binutils-2.14.90.0.6-r5.ebuild | 216 | ||||
-rw-r--r-- | sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch | 834 | ||||
-rw-r--r-- | sys-devel/binutils/files/digest-binutils-2.14.90.0.6-r5 | 1 |
5 files changed, 1063 insertions, 3 deletions
diff --git a/sys-devel/binutils/ChangeLog b/sys-devel/binutils/ChangeLog index 56a712a92255..f793776c4f75 100644 --- a/sys-devel/binutils/ChangeLog +++ b/sys-devel/binutils/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-devel/binutils # Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/ChangeLog,v 1.76 2003/10/05 02:20:24 azarah Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/ChangeLog,v 1.77 2003/10/05 18:55:50 azarah Exp $ + +*binutils-2.14.90.0.6-r5 (05 Oct 2003) + + 05 Oct 2003; Martin Schlemmer <azarah@gentoo.org> + binutils-2.14.90.0.6-r5.ebuild, + files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch: + Add ppc-bfd.patch to fix ppc issues, bug #28011. Remove bfd-elf-interp.patch, + as it breaks section attibutes as in + http://gcc.gnu.org/ml/gcc/2003-10/msg00141.html. *binutils-2.14.90.0.6-r4 (05 Oct 2003) diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index f59ccfa45f85..3257c2bac7e9 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -1,13 +1,13 @@ MD5 180a5724a39c60a76cce5d23a40b23f7 binutils-2.13.90.0.18-r1.ebuild 5367 MD5 6d2fe81a47256f8c2cc53c0d9696ed84 binutils-2.14.90.0.2.ebuild 5330 -MD5 257d83afd2ecb89d8477071e65ed7ba3 binutils-2.14.90.0.6-r5.ebuild 6540 +MD5 3900d9068ef67b50b863fddbad3aaa96 binutils-2.14.90.0.6-r5.ebuild 6538 MD5 3b3bb8e5916c0d12da07c5bfeb5d09cf binutils-2.14.90.0.6-r2.ebuild 5602 MD5 e56840c0286c1b40a114e80ced64dc45 binutils-2.13.90.0.18.ebuild 4572 MD5 bc3f212a30ea4168eaf3b97df6d552ac binutils-2.14.90.0.6-r3.ebuild 6018 MD5 0128e4349da81a9b35d368f3f5457d08 binutils-2.14.90.0.6-r1.ebuild 5115 MD5 b7ddfee30d6b7884c1b9088c6fde759d binutils-2.13.90.0.16-r1.ebuild 4661 MD5 1b11085f74185bfe7061a6fb01d62ebd binutils-2.12.90.0.15.ebuild 3501 -MD5 dd51081dd69d908fd59eee586387256d ChangeLog 17076 +MD5 b057922fc277523e1f4ea4f4ba69def8 ChangeLog 17422 MD5 b7db6fb32b4653b2832c60bc12dce7a1 binutils-2.11.92.0.7.ebuild 2325 MD5 0605cad192892662d9ab7bcf4292a278 binutils-2.11.92.0.12.3-r2.ebuild 3047 MD5 eef83daafb41a3e0beafc59446a00002 binutils-2.14.90.0.6-r4.ebuild 6284 diff --git a/sys-devel/binutils/binutils-2.14.90.0.6-r5.ebuild b/sys-devel/binutils/binutils-2.14.90.0.6-r5.ebuild new file mode 100644 index 000000000000..c0ff65909e2e --- /dev/null +++ b/sys-devel/binutils/binutils-2.14.90.0.6-r5.ebuild @@ -0,0 +1,216 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/binutils/binutils-2.14.90.0.6-r5.ebuild,v 1.1 2003/10/05 18:55:50 azarah Exp $ + +IUSE="nls bootstrap build" + +# NOTE to Maintainer: ChangeLog states that it no longer use perl to build +# the manpages, but seems this is incorrect .... + +inherit eutils libtool flag-o-matic + +# Generate borked binaries. Bug #6730 +filter-flags "-fomit-frame-pointer -fssa" + +S="${WORKDIR}/${P}" +DESCRIPTION="Tools necessary to build programs" +SRC_URI="mirror://kernel/linux/devel/binutils/${P}.tar.bz2 + mirror://kernel/linux/devel/binutils/test/${P}.tar.bz2" +HOMEPAGE="http://sources.redhat.com/binutils/" + +SLOT="0" +LICENSE="GPL-2 | LGPL-2" +KEYWORDS="~amd64 ~x86 ~ppc ~alpha ~sparc ~mips ~hppa ~arm ~ia64" + +DEPEND="virtual/glibc + >=sys-apps/portage-2.0.21 + nls? ( sys-devel/gettext ) + || ( dev-lang/perl + ( !build? ( dev-lang/perl ) ) + ( !bootstrap? ( dev-lang/perl ) ) + )" +# This is a hairy one. Basically depend on dev-lang/perl +# if "build" or "bootstrap" not in USE. + + +# filter CFLAGS=".. -O2 .." on arm +if [ "${ARCH}" = "arm" ]; then + CFLAGS="$(echo "${CFLAGS}" | sed -e 's,-O[2-9] ,-O1 ,')" +fi + +src_unpack() { + + unpack ${A} + + cd ${S} + epatch ${FILESDIR}/2.13/${PN}-2.13.90.0.10-glibc21.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.4-sparc-nonpic.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-sparc-cfi.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-eh-frame-ro-2.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.4-ltconfig-multilib.patch +# Might think of adding the Prescott stuff later on +# epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.4-pni.patch +# This one cause failures in sash and util-linux-2.12 (bug #27330) +# epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.5-place-orphan.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.5-s390-pie.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.5-ppc64-pie.patch + epatch ${FILESDIR}/2.13/${PN}-2.13.90.0.10-x86_64-testsuite.patch + epatch ${FILESDIR}/2.13/${PN}-2.13.90.0.10-x86_64-gotpcrel.patch + epatch ${FILESDIR}/2.13/${PN}-2.13.90.0.18-testsuite-Wall-fixes.patch + + # There is a bug in binutils 2.14.* which causes a segfault in certain + # circumstances when linking. This bug does not exist in binutils 2.11.*. + # + # More details on the bug can be found here: + # http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00559.html + # http://sources.redhat.com/ml/bug-binutils/2003-q3/msg00735.html + # + # Bug #27492, thanks to Adam Chodorowski <adam@chodorowski.com> for + # reporting. + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-dont-crash-on-null-owner.patch + # This increase c++ linking 2 to 3 times, bug #27540. + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-merge-speedup.patch + +# This breaks section attributes witch I posted to about here: +# +# http://gcc.gnu.org/ml/gcc/2003-10/msg00141.html +# +# epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-bfd-elf-interp.patch + + # Some IA64 patches + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-ia64-howto.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-ia64-sdata.patch + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-ia64-speedup.patch + + # Fix problems compiling kernels on PPC, bug #28011. + EPATCH_OPTS="-l" \ + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-ppc-bfd.patch + + if [ "${ARCH}" == "hppa" ] || [ "${ARCH}" == "hppa64" ] + then + epatch ${FILESDIR}/2.14/${PN}-2.14.90.0.6-hppa-static.diff + fi + if [ "${ARCH}" == "amd64" ] + then + epatch ${FILESDIR}/${PN}-2.14.amd64-32bit-path-fix.patch + fi + + use x86 &> /dev/null \ + && epatch ${FILESDIR}/2.13/${PN}-2.13.90.0.20-array-sects-compat.patch + + # Libtool is broken (Redhat). + for x in ${S}/opcodes/Makefile.{am,in} + do + cp ${x} ${x}.orig + gawk ' + { + if ($0 ~ /LIBADD/) + gsub("../bfd/libbfd.la", "-L../bfd/.libs ../bfd/libbfd.la") + + print + }' ${x}.orig > ${x} + rm -rf ${x}.orig + done +} + +src_compile() { + local myconf= + + use nls && \ + myconf="${myconf} --without-included-gettext" || \ + myconf="${myconf} --disable-nls" + + # Fix /usr/lib/libbfd.la + elibtoolize --portage + + ./configure --enable-shared \ + --enable-64-bit-bfd \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --host=${CHOST} \ + ${myconf} || die + + make configure-bfd || die + make headers -C bfd || die + emake tooldir="${ROOT}/usr/bin" \ + all || die + + if [ -z "`use build`" ] + then + if [ -z "`use bootstrap`" ] + then + # Nuke the manpages to recreate them (only use this if we have perl) + find . -name '*.1' -exec rm -f {} \; || : + fi + # Make the info pages (makeinfo included with gcc is used) + make info || die + fi +} + +src_install() { + + make prefix=${D}/usr \ + mandir=${D}/usr/share/man \ + infodir=${D}/usr/share/info \ + install || die + + insinto /usr/include + doins include/libiberty.h + + # c++filt is included with gcc -- what are these GNU people thinking? + # but not the manpage, so leave that! +# We install it now, as gcc-3.3 do not have it any longer ... +# rm -f ${D}/usr/bin/c++filt #${D}/usr/share/man/man1/c++filt* + + # By default strip has a symlink going from /usr/${CHOST}/bin/strip to + # /usr/bin/strip we should reverse it: + + rm ${D}/usr/${CHOST}/bin/strip; mv ${D}/usr/bin/strip ${D}/usr/${CHOST}/bin/strip + # The strip symlink gets created in the loop below + + # By default ar, as, ld, nm, ranlib and strip are in two places; create + # symlinks. This will reduce the size of the tbz2 significantly. We also + # move all the stuff in /usr/bin to /usr/${CHOST}/bin and create the + # appropriate symlinks. Things are cleaner that way. + cd ${D}/usr/bin + local x= + for x in * strip + do + if [ ! -e ../${CHOST}/bin/${x} ] + then + mv ${x} ../${CHOST}/bin/${x} + else + rm -f ${x} + fi + ln -s ../${CHOST}/bin/${x} ${x} + done + + cd ${S} + if [ -z "`use build`" ] + then + make prefix=${D}/usr \ + mandir=${D}/usr/share/man \ + infodir=${D}/usr/share/info \ + install-info || die + + dodoc COPYING* README + docinto bfd + dodoc bfd/ChangeLog* bfd/COPYING bfd/README bfd/PORTING bfd/TODO + docinto binutils + dodoc binutils/ChangeLog binutils/NEWS binutils/README + docinto gas + dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/COPYING gas/NEWS gas/README* + docinto gprof + dodoc gprof/ChangeLog* gprof/TEST gprof/TODO + docinto ld + dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + docinto libiberty + dodoc libiberty/ChangeLog* libiberty/COPYING.LIB libiberty/README + docinto opcodes + dodoc opcodes/ChangeLog* + # Install pre-generated manpages .. currently we do not ... + else + rm -rf ${D}/usr/share/man + fi +} diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch new file mode 100644 index 000000000000..0a9589c31856 --- /dev/null +++ b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch @@ -0,0 +1,834 @@ +Index: bfd/elf-bfd.h +=================================================================== +RCS file: /cvs/src/src/bfd/elf-bfd.h,v +retrieving revision 1.110 +diff -u -p -r1.110 elf-bfd.h +--- bfd/elf-bfd.h 20 Aug 2003 08:37:18 -0000 1.110 ++++ bfd/elf-bfd.h 22 Sep 2003 16:03:05 -0000 +@@ -511,11 +511,16 @@ typedef enum { + struct bfd_elf_special_section + { + const char *prefix; +- size_t prefix_length; +- const char *suffix; +- size_t suffix_length; ++ int prefix_length; ++ /* 0 means name must match PREFIX exactly. ++ -1 means name must start with PREFIX followed by an arbitrary string. ++ -2 means name must match PREFIX exactly or consist of PREFIX followed ++ by a dot then anything. ++ > 0 means name must start with the first PREFIX_LENGTH chars of ++ PREFIX and finish with the last SUFFIX_LENGTH chars of PREFIX. */ ++ int suffix_length; + int type; +- int attributes; ++ int attr; + }; + + struct elf_backend_data +@@ -1384,8 +1389,8 @@ extern bfd_boolean _bfd_elf_new_section_ + (bfd *, asection *); + extern bfd_boolean _bfd_elf_init_reloc_shdr + (bfd *, Elf_Internal_Shdr *, asection *, bfd_boolean); +-extern bfd_boolean _bfd_elf_get_sec_type_attr +- (bfd *, const char *, int *, int *); ++extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr ++ (bfd *, const char *); + + /* If the target doesn't have reloc handling written yet: */ + extern void _bfd_elf_no_info_to_howto +Index: bfd/elf.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf.c,v +retrieving revision 1.199 +diff -u -p -r1.199 elf.c +--- bfd/elf.c 19 Sep 2003 02:08:35 -0000 1.199 ++++ bfd/elf.c 22 Sep 2003 16:03:07 -0000 +@@ -2019,82 +2019,44 @@ bfd_section_from_elf_index (bfd *abfd, u + + static struct bfd_elf_special_section const special_sections[] = + { +- { ".bss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { ".comment", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".data", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".data1", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".debug", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".fini", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".init", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".line", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".rodata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".rodata1", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".tbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, +- { ".tdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, +- { ".text", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".init_array", 0, NULL, 0, +- SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, +- { ".fini_array", 0, NULL, 0, +- SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, +- { ".preinit_array", 0, NULL, 0, +- SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE }, +- { ".debug_line", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".debug_info", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".debug_abbrev", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".debug_aranges", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".dynamic", 0, NULL, 0, +- SHT_DYNAMIC, SHF_ALLOC }, +- { ".dynstr", 0, NULL, 0, +- SHT_STRTAB, SHF_ALLOC }, +- { ".dynsym", 0, NULL, 0, +- SHT_DYNSYM, SHF_ALLOC }, +- { ".got", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".hash", 0, NULL, 0, +- SHT_HASH, SHF_ALLOC }, +- { ".interp", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { ".plt", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".shstrtab", 0, NULL, 0, +- SHT_STRTAB, 0 }, +- { ".strtab", 0, NULL, 0, +- SHT_STRTAB, 0 }, +- { ".symtab", 0, NULL, 0, +- SHT_SYMTAB, 0 }, +- { ".gnu.version", 0, NULL, 0, +- SHT_GNU_versym, 0 }, +- { ".gnu.version_d", 0, NULL, 0, +- SHT_GNU_verdef, 0 }, +- { ".gnu.version_r", 0, NULL, 0, +- SHT_GNU_verneed, 0 }, +- { ".note", 5, NULL, 0, +- SHT_NOTE, 0 }, +- { ".rela", 5, NULL, 0, +- SHT_RELA, 0 }, +- { ".rel", 4, NULL, 0, +- SHT_REL, 0 }, +- { ".stab", 5, "str", 3, +- SHT_STRTAB, 0 }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".bss", 4, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".comment", 8, 0, SHT_PROGBITS, 0 }, ++ { ".data", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".data1", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".debug", 6, 0, SHT_PROGBITS, 0 }, ++ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".line", 5, 0, SHT_PROGBITS, 0 }, ++ { ".rodata", 7, -2, SHT_PROGBITS, SHF_ALLOC }, ++ { ".rodata1", 8, 0, SHT_PROGBITS, SHF_ALLOC }, ++ { ".tbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, ++ { ".tdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_TLS }, ++ { ".text", 5, -2, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".init_array", 11, 0, SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, ++ { ".fini_array", 11, 0, SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, ++ { ".preinit_array", 14, 0, SHT_PREINIT_ARRAY, SHF_ALLOC + SHF_WRITE }, ++ { ".debug_line", 11, 0, SHT_PROGBITS, 0 }, ++ { ".debug_info", 11, 0, SHT_PROGBITS, 0 }, ++ { ".debug_abbrev", 13, 0, SHT_PROGBITS, 0 }, ++ { ".debug_aranges", 14, 0, SHT_PROGBITS, 0 }, ++ { ".dynamic", 8, 0, SHT_DYNAMIC, SHF_ALLOC }, ++ { ".dynstr", 7, 0, SHT_STRTAB, SHF_ALLOC }, ++ { ".dynsym", 7, 0, SHT_DYNSYM, SHF_ALLOC }, ++ { ".got", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".hash", 5, 0, SHT_HASH, SHF_ALLOC }, ++ { ".interp", 7, 0, SHT_PROGBITS, 0 }, ++ { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".shstrtab", 9, 0, SHT_STRTAB, 0 }, ++ { ".strtab", 7, 0, SHT_STRTAB, 0 }, ++ { ".symtab", 7, 0, SHT_SYMTAB, 0 }, ++ { ".gnu.version", 12, 0, SHT_GNU_versym, 0 }, ++ { ".gnu.version_d", 14, 0, SHT_GNU_verdef, 0 }, ++ { ".gnu.version_r", 14, 0, SHT_GNU_verneed, 0 }, ++ { ".note", 5, -1, SHT_NOTE, 0 }, ++ { ".rela", 5, -1, SHT_RELA, 0 }, ++ { ".rel", 4, -1, SHT_REL, 0 }, ++ { ".stabstr", 5, 3, SHT_STRTAB, 0 }, ++ { NULL, 0, 0, 0, 0 } + }; + + static const struct bfd_elf_special_section * +@@ -2103,32 +2065,55 @@ get_special_section (const char *name, + unsigned int rela) + { + int i; ++ int len = strlen (name); + + for (i = 0; special_sections[i].prefix != NULL; i++) +- if (((special_sections[i].prefix_length +- && strncmp (name, special_sections[i].prefix, +- special_sections[i].prefix_length) == 0 +- && (! special_sections[i].suffix_length +- || strcmp ((name + strlen (name) +- - special_sections[i].suffix_length), +- special_sections[i].suffix) == 0)) +- || strcmp (name, special_sections[i].prefix) == 0) +- && (rela || special_sections[i].type != SHT_RELA)) ++ { ++ int suffix_len; ++ int prefix_len = special_sections[i].prefix_length; ++ ++ if (len < prefix_len) ++ continue; ++ if (memcmp (name, special_sections[i].prefix, prefix_len) != 0) ++ continue; ++ ++ suffix_len = special_sections[i].suffix_length; ++ if (suffix_len <= 0) ++ { ++ if (name[prefix_len] != 0) ++ { ++ if (suffix_len == 0) ++ continue; ++ if (name[prefix_len] != '.' ++ && (suffix_len == -2 ++ || (rela && special_sections[i].type == SHT_REL))) ++ continue; ++ } ++ } ++ else ++ { ++ if (len < prefix_len + suffix_len) ++ continue; ++ if (memcmp (name + len - suffix_len, ++ special_sections[i].prefix + prefix_len, ++ suffix_len) != 0) ++ continue; ++ } + return &special_sections[i]; ++ } + + return NULL; + } + +-bfd_boolean +-_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name, int *type, int *attr) ++const struct bfd_elf_special_section * ++_bfd_elf_get_sec_type_attr (bfd *abfd, const char *name) + { +- bfd_boolean found = FALSE; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); ++ const struct bfd_elf_special_section *ssect = NULL; + + /* See if this is one of the special sections. */ + if (name) + { +- const struct bfd_elf_special_section *ssect = NULL; + unsigned int rela = bed->default_use_rela_p; + + if (bed->special_sections) +@@ -2136,23 +2121,16 @@ _bfd_elf_get_sec_type_attr (bfd *abfd, c + + if (! ssect) + ssect = get_special_section (name, special_sections, rela); +- +- if (ssect) +- { +- *type = ssect->type; +- *attr = ssect->attributes; +- found = TRUE; +- } + } + +- return found; ++ return ssect; + } + + bfd_boolean + _bfd_elf_new_section_hook (bfd *abfd, asection *sec) + { + struct bfd_elf_section_data *sdata; +- int type, attr; ++ const struct bfd_elf_special_section *ssect; + + sdata = (struct bfd_elf_section_data *) sec->used_by_bfd; + if (sdata == NULL) +@@ -2164,11 +2142,11 @@ _bfd_elf_new_section_hook (bfd *abfd, as + } + + elf_section_type (sec) = SHT_NULL; +- if (sec->name && _bfd_elf_get_sec_type_attr (abfd, sec->name, +- &type, &attr)) ++ ssect = _bfd_elf_get_sec_type_attr (abfd, sec->name); ++ if (ssect != NULL) + { +- elf_section_type (sec) = type; +- elf_section_flags (sec) = attr; ++ elf_section_type (sec) = ssect->type; ++ elf_section_flags (sec) = ssect->attr; + } + + /* Indicate whether or not this section should use RELA relocations. */ +Index: bfd/elf32-m32r.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-m32r.c,v +retrieving revision 1.34 +diff -u -p -r1.34 elf32-m32r.c +--- bfd/elf32-m32r.c 25 Jul 2003 14:35:55 -0000 1.34 ++++ bfd/elf32-m32r.c 22 Sep 2003 16:03:07 -0000 +@@ -2094,12 +2094,9 @@ m32r_elf_check_relocs (abfd, info, sec, + + static struct bfd_elf_special_section const m32r_elf_special_sections[]= + { +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define ELF_ARCH bfd_arch_m32r +Index: bfd/elf32-m68hc11.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-m68hc11.c,v +retrieving revision 1.22 +diff -u -p -r1.22 elf32-m68hc11.c +--- bfd/elf32-m68hc11.c 6 Sep 2003 20:55:50 -0000 1.22 ++++ bfd/elf32-m68hc11.c 22 Sep 2003 16:03:08 -0000 +@@ -1289,16 +1289,11 @@ m68hc11_elf_relax_delete_bytes (abfd, se + vectors. */ + static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]= + { +- { ".eeprom", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".softregs", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { ".page0", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".vectors", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define ELF_ARCH bfd_arch_m68hc11 +Index: bfd/elf32-m68hc12.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-m68hc12.c,v +retrieving revision 1.15 +#diff -u -p -r1.15 elf32-m68hc12.c +#--- bfd/elf32-m68hc12.c 6 Sep 2003 20:55:50 -0000 1.15 +#+++ bfd/elf32-m68hc12.c 22 Sep 2003 16:03:09 -0000 +#@@ -545,16 +545,11 @@ m68hc12_elf_set_mach_from_flags (abfd) +# vectors. */ +# static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]= +# { +#- { ".eeprom", 0, NULL, 0, +#- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +#- { ".softregs", 0, NULL, 0, +#- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +#- { ".page0", 0, NULL, 0, +#- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +#- { ".vectors", 0, NULL, 0, +#- SHT_PROGBITS, SHF_ALLOC }, +#- { NULL, 0, NULL, 0, +#- 0, 0 } +#+ { ".eeprom", 7, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +#+ { ".softregs", 9, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +#+ { ".page0", 6, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +#+ { ".vectors", 8, 0, SHT_PROGBITS, SHF_ALLOC }, +#+ { NULL, 0, 0, 0, 0 } +# }; + +# #define ELF_ARCH bfd_arch_m68hc12 +Index: bfd/elf32-mcore.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-mcore.c,v +retrieving revision 1.28 +diff -u -p -r1.28 elf32-mcore.c +--- bfd/elf32-mcore.c 25 Jul 2003 14:35:55 -0000 1.28 ++++ bfd/elf32-mcore.c 22 Sep 2003 16:03:09 -0000 +@@ -683,12 +683,9 @@ mcore_elf_check_relocs (abfd, info, sec, + + static struct bfd_elf_special_section const mcore_elf_special_sections[]= + { +- { ".ctors", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".dtors", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".ctors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".dtors", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define TARGET_BIG_SYM bfd_elf32_mcore_big_vec +Index: bfd/elf32-ppc.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-ppc.c,v +retrieving revision 1.100 +diff -u -p -r1.100 elf32-ppc.c +--- bfd/elf32-ppc.c 20 Aug 2003 08:37:17 -0000 1.100 ++++ bfd/elf32-ppc.c 22 Sep 2003 16:03:12 -0000 +@@ -6186,26 +6186,16 @@ ppc_elf_final_write_processing (bfd *abf + + static struct bfd_elf_special_section const ppc_elf_special_sections[]= + { +- { ".tags", 0, NULL, 0, +- SHT_ORDERED, SHF_ALLOC }, +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { ".sdata2", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".sbss2", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".PPC.EMB.apuinfo", 0, NULL, 0, +- SHT_NOTE, 0 }, +- { ".PPC.EMB.sdata0", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".PPC.EMB.sbss0", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC }, +- { ".plt", 0, NULL, 0, +- SHT_NOBITS, 0 }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".tags", 5, 0, SHT_ORDERED, SHF_ALLOC }, ++ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".sdata2", 7, -2, SHT_PROGBITS, SHF_ALLOC }, ++ { ".sbss2", 6, -2, SHT_PROGBITS, SHF_ALLOC }, ++ { ".PPC.EMB.apuinfo", 16, 0, SHT_NOTE, 0 }, ++ { ".PPC.EMB.sdata0", 15, 0, SHT_PROGBITS, SHF_ALLOC }, ++ { ".PPC.EMB.sbss0", 14, 0, SHT_PROGBITS, SHF_ALLOC }, ++ { ".plt", 4, 0, SHT_NOBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec +Index: bfd/elf32-sh64.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-sh64.c,v +retrieving revision 1.18 +diff -u -p -r1.18 elf32-sh64.c +--- bfd/elf32-sh64.c 7 Aug 2003 08:38:07 -0000 1.18 ++++ bfd/elf32-sh64.c 22 Sep 2003 16:03:12 -0000 +@@ -737,10 +737,8 @@ sh64_elf_final_write_processing (bfd *ab + + static struct bfd_elf_special_section const sh64_elf_special_sections[]= + { +- { ".cranges", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".cranges", 8, 0, SHT_PROGBITS, 0 }, ++ { NULL, 0, 0, 0, 0 } + }; + + #undef TARGET_BIG_SYM +Index: bfd/elf32-v850.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-v850.c,v +retrieving revision 1.35 +diff -u -p -r1.35 elf32-v850.c +--- bfd/elf32-v850.c 4 Sep 2003 11:04:34 -0000 1.35 ++++ bfd/elf32-v850.c 22 Sep 2003 16:03:14 -0000 +@@ -3163,34 +3163,33 @@ v850_elf_relax_section (abfd, sec, link_ + + static struct bfd_elf_special_section const v850_elf_special_sections[]= + { +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, +- { ".rosdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_V850_GPREL }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, +- { ".scommon", 0, NULL, 0, +- SHT_V850_SCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL }, +- { ".tdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL }, +- { ".tbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL }, +- { ".tcommon", 0, NULL, 0, +- SHT_V850_TCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, +- { ".zdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, +- { ".rozdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_V850_R0REL }, +- { ".zbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, +- { ".zcommon", 0, NULL, 0, +- SHT_V850_ZCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL }, +- { ".call_table_data", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".call_table_text", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_GPREL) }, ++ { ".rosdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC ++ + SHF_V850_GPREL) }, ++ { ".sbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_GPREL) }, ++ { ".scommon", 8, -2, SHT_V850_SCOMMON, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_GPREL) }, ++ { ".tdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_EPREL) }, ++ { ".tbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_EPREL) }, ++ { ".tcommon", 8, -2, SHT_V850_TCOMMON, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_R0REL) }, ++ { ".zdata", 6, -2, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_R0REL) }, ++ { ".rozdata", 8, -2, SHT_PROGBITS, (SHF_ALLOC ++ + SHF_V850_R0REL) }, ++ { ".zbss", 5, -2, SHT_NOBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_R0REL) }, ++ { ".zcommon", 8, -2, SHT_V850_ZCOMMON, (SHF_ALLOC + SHF_WRITE ++ + SHF_V850_R0REL) }, ++ { ".call_table_data", 16, 0, SHT_PROGBITS, (SHF_ALLOC ++ + SHF_WRITE) }, ++ { ".call_table_text", 16, 0, SHT_PROGBITS, (SHF_ALLOC + SHF_WRITE ++ + SHF_EXECINSTR) }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define TARGET_LITTLE_SYM bfd_elf32_v850_vec +Index: bfd/elf32-xtensa.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v +retrieving revision 1.11 +diff -u -p -r1.11 elf32-xtensa.c +--- bfd/elf32-xtensa.c 20 Aug 2003 08:37:18 -0000 1.11 ++++ bfd/elf32-xtensa.c 22 Sep 2003 16:03:17 -0000 +@@ -5841,14 +5841,10 @@ xtensa_callback_required_dependence (abf + module loader so that the literals are not placed after the text. */ + static struct bfd_elf_special_section const elf_xtensa_special_sections[]= + { +- { ".literal", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".init.literal", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { ".fini.literal", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".literal", 8, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".init.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { ".fini.literal", 13, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, ++ { NULL, 0, 0, 0, 0 } + }; + + +Index: bfd/elf64-alpha.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf64-alpha.c,v +retrieving revision 1.106 +diff -u -p -r1.106 elf64-alpha.c +--- bfd/elf64-alpha.c 21 Sep 2003 19:24:52 -0000 1.106 ++++ bfd/elf64-alpha.c 22 Sep 2003 16:03:20 -0000 +@@ -5449,12 +5449,9 @@ elf64_alpha_reloc_type_class (rela) + + static struct bfd_elf_special_section const elf64_alpha_special_sections[]= + { +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, ++ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, ++ { NULL, 0, 0, 0, 0 } + }; + + /* ECOFF swapping routines. These are used when dealing with the +Index: bfd/elf64-hppa.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf64-hppa.c,v +retrieving revision 1.38 +diff -u -p -r1.38 elf64-hppa.c +--- bfd/elf64-hppa.c 21 Aug 2003 14:00:06 -0000 1.38 ++++ bfd/elf64-hppa.c 22 Sep 2003 16:03:22 -0000 +@@ -2675,12 +2675,9 @@ elf64_hppa_elf_get_symbol_type (elf_sym, + + static struct bfd_elf_special_section const elf64_hppa_special_sections[]= + { +- { ".fini", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".init", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".fini", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".init", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { NULL, 0, 0, 0, 0 } + }; + + /* The hash bucket size is the standard one, namely 4. */ +Index: bfd/elf64-ppc.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf64-ppc.c,v +retrieving revision 1.130 +diff -u -p -r1.130 elf64-ppc.c +--- bfd/elf64-ppc.c 20 Aug 2003 08:37:18 -0000 1.130 ++++ bfd/elf64-ppc.c 22 Sep 2003 16:03:26 -0000 +@@ -2405,20 +2405,13 @@ ppc64_elf_merge_private_bfd_data (bfd *i + + static struct bfd_elf_special_section const ppc64_elf_special_sections[]= + { +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { ".plt", 0, NULL, 0, +- SHT_NOBITS, 0 }, +- { ".toc", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".toc1", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, +- { ".tocbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".plt", 4, 0, SHT_NOBITS, 0 }, ++ { ".toc", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".toc1", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, ++ { ".tocbss", 7, 0, SHT_NOBITS, SHF_ALLOC + SHF_WRITE }, ++ { NULL, 0, 0, 0, 0 } + }; + + struct _ppc64_elf_section_data +Index: bfd/elf64-sh64.c +=================================================================== +RCS file: /cvs/src/src/bfd/elf64-sh64.c,v +retrieving revision 1.35 +diff -u -p -r1.35 elf64-sh64.c +--- bfd/elf64-sh64.c 20 Aug 2003 08:37:18 -0000 1.35 ++++ bfd/elf64-sh64.c 22 Sep 2003 16:03:28 -0000 +@@ -4118,10 +4118,8 @@ sh64_elf64_finish_dynamic_sections (bfd + + static struct bfd_elf_special_section const sh64_elf64_special_sections[]= + { +- { ".cranges", 0, NULL, 0, +- SHT_PROGBITS, 0 }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".cranges", 8, 0, SHT_PROGBITS, 0 }, ++ { NULL, 0, 0, 0, 0 } + }; + + #define TARGET_BIG_SYM bfd_elf64_sh64_vec +Index: bfd/elfxx-ia64.c +=================================================================== +RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v +retrieving revision 1.100 +diff -u -p -r1.100 elfxx-ia64.c +--- bfd/elfxx-ia64.c 10 Sep 2003 20:48:32 -0000 1.100 ++++ bfd/elfxx-ia64.c 22 Sep 2003 16:03:30 -0000 +@@ -4748,12 +4748,9 @@ elfNN_ia64_reloc_type_class (rela) + + static struct bfd_elf_special_section const elfNN_ia64_special_sections[]= + { +- { ".sbss", 5, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, +- { ".sdata", 6, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sbss", 5, -1, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, ++ { ".sdata", 6, -1, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, ++ { NULL, 0, 0, 0, 0 } + }; + + static bfd_boolean +Index: bfd/elfxx-mips.c +=================================================================== +RCS file: /cvs/src/src/bfd/elfxx-mips.c,v +retrieving revision 1.74 +diff -u -p -r1.74 elfxx-mips.c +--- bfd/elfxx-mips.c 20 Aug 2003 08:37:19 -0000 1.74 ++++ bfd/elfxx-mips.c 22 Sep 2003 16:03:36 -0000 +@@ -9296,18 +9296,11 @@ _bfd_mips_elf_print_private_bfd_data (ab + + struct bfd_elf_special_section const _bfd_mips_elf_special_sections[]= + { +- { ".sdata", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, +- { ".sbss", 0, NULL, 0, +- SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, +- { ".lit4", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, +- { ".lit8", 0, NULL, 0, +- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, +- { ".ucode", 0, NULL, 0, +- SHT_MIPS_UCODE, 0 }, +- { ".mdebug", 0, NULL, 0, +- SHT_MIPS_DEBUG, 0 }, +- { NULL, 0, NULL, 0, +- 0, 0 } ++ { ".sdata", 6, -2, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, ++ { ".sbss", 5, -2, SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, ++ { ".lit4", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, ++ { ".lit8", 5, 0, SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_MIPS_GPREL }, ++ { ".ucode", 6, 0, SHT_MIPS_UCODE, 0 }, ++ { ".mdebug", 7, 0, SHT_MIPS_DEBUG, 0 }, ++ { NULL, 0, 0, 0, 0 } + }; +Index: gas/config/obj-elf.c +=================================================================== +RCS file: /cvs/src/src/gas/config/obj-elf.c,v +retrieving revision 1.72 +diff -u -p -r1.72 obj-elf.c +--- gas/config/obj-elf.c 30 Jul 2003 14:11:03 -0000 1.72 ++++ gas/config/obj-elf.c 22 Sep 2003 16:03:43 -0000 +@@ -614,8 +614,7 @@ obj_elf_change_section (name, type, attr + asection *old_sec; + segT sec; + flagword flags; +- int def_type; +- int def_attr; ++ const struct bfd_elf_special_section *ssect; + + #ifdef md_flush_pending_output + md_flush_pending_output (); +@@ -638,13 +637,13 @@ obj_elf_change_section (name, type, attr + + old_sec = bfd_get_section_by_name (stdoutput, name); + sec = subseg_new (name, 0); ++ ssect = _bfd_elf_get_sec_type_attr (stdoutput, name); + +- if (_bfd_elf_get_sec_type_attr (stdoutput, name, &def_type, +- &def_attr)) ++ if (ssect != NULL) + { + if (type == SHT_NULL) +- type = def_type; +- else if (type != def_type) ++ type = ssect->type; ++ else if (type != ssect->type) + { + if (old_sec == NULL + /* FIXME: gcc, as of 2002-10-22, will emit +@@ -653,12 +652,12 @@ obj_elf_change_section (name, type, attr + + for __attribute__ ((section (".init_array"))). + "@progbits" is incorrect. */ +- && def_type != SHT_INIT_ARRAY +- && def_type != SHT_FINI_ARRAY +- && def_type != SHT_PREINIT_ARRAY) ++ && ssect->type != SHT_INIT_ARRAY ++ && ssect->type != SHT_FINI_ARRAY ++ && ssect->type != SHT_PREINIT_ARRAY) + { + /* We allow to specify any type for a .note section. */ +- if (def_type != SHT_NOTE) ++ if (ssect->type != SHT_NOTE) + as_warn (_("setting incorrect section type for %s"), + name); + } +@@ -666,22 +665,31 @@ obj_elf_change_section (name, type, attr + { + as_warn (_("ignoring incorrect section type for %s"), + name); +- type = def_type; ++ type = ssect->type; + } + } + +- if (old_sec == NULL && (attr &~ def_attr) != 0) ++ if (old_sec == NULL && (attr &~ ssect->attr) != 0) + { + /* As a GNU extension, we permit a .note section to be +- allocatable. If the linker sees an allocateable .note ++ allocatable. If the linker sees an allocatable .note + section, it will create a PT_NOTE segment in the output + file. We also allow "x" for .note.GNU-stack. */ +- if (!(def_type == SHT_NOTE +- && (attr == SHF_ALLOC || attr == SHF_EXECINSTR))) ++ if (ssect->type == SHT_NOTE ++ && (attr == SHF_ALLOC || attr == SHF_EXECINSTR)) ++ ; ++ /* Allow different SHF_MERGE and SHF_STRINGS if we have ++ something like .rodata.str. */ ++ else if (ssect->suffix_length == -2 ++ && name[ssect->prefix_length] == '.' ++ && (attr &~ ssect->attr &~ SHF_MERGE &~ SHF_STRINGS) == 0) ++ ; ++ else + as_warn (_("setting incorrect section attributes for %s"), + name); + } +- attr |= def_attr; ++ if (old_sec == NULL) ++ attr |= ssect->attr; + } + + if (type != SHT_NULL) +Index: ld/testsuite/ld-discard/exit.s +=================================================================== +RCS file: /cvs/src/src/ld/testsuite/ld-discard/exit.s,v +retrieving revision 1.2 +diff -u -p -r1.2 exit.s +--- ld/testsuite/ld-discard/exit.s 30 Jul 2002 07:41:10 -0000 1.2 ++++ ld/testsuite/ld-discard/exit.s 22 Sep 2003 16:03:44 -0000 +@@ -2,5 +2,5 @@ + .section .data.exit,"aw" + data: + .globl text +- .section .text.exit,"aw" ++ .section .text.exit,"ax" + text: +Index: ld/testsuite/ld-discard/extern.s +=================================================================== +RCS file: /cvs/src/src/ld/testsuite/ld-discard/extern.s,v +retrieving revision 1.3 +diff -u -p -r1.3 extern.s +--- ld/testsuite/ld-discard/extern.s 13 Apr 2003 14:42:22 -0000 1.3 ++++ ld/testsuite/ld-discard/extern.s 22 Sep 2003 16:03:44 -0000 +@@ -2,7 +2,7 @@ + .section .data.exit,"aw" + data: + .globl text +- .section .text.exit,"aw" ++ .section .text.exit,"ax" + text: + .text + .globl _start +Index: ld/testsuite/ld-discard/static.s +=================================================================== +RCS file: /cvs/src/src/ld/testsuite/ld-discard/static.s,v +retrieving revision 1.3 +diff -u -p -r1.3 static.s +--- ld/testsuite/ld-discard/static.s 13 Apr 2003 14:42:22 -0000 1.3 ++++ ld/testsuite/ld-discard/static.s 22 Sep 2003 16:03:44 -0000 +@@ -1,6 +1,6 @@ + .section .data.exit,"aw" + data: +- .section .text.exit,"aw" ++ .section .text.exit,"ax" + text: + .text + .globl _start + diff --git a/sys-devel/binutils/files/digest-binutils-2.14.90.0.6-r5 b/sys-devel/binutils/files/digest-binutils-2.14.90.0.6-r5 new file mode 100644 index 000000000000..26abe27b6c76 --- /dev/null +++ b/sys-devel/binutils/files/digest-binutils-2.14.90.0.6-r5 @@ -0,0 +1 @@ +MD5 71b99dba3045a359dc314dbebedcf502 binutils-2.14.90.0.6.tar.bz2 10399066 |