diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2003-08-24 14:23:25 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2003-08-24 14:23:25 +0000 |
commit | 229fe0346520cc93546b785e6c8797898695e14e (patch) | |
tree | 0db9d6ae955e74b038e38bbc67de02908a624ce6 /sys-devel | |
parent | Update version (diff) | |
download | historical-229fe0346520cc93546b785e6c8797898695e14e.tar.gz historical-229fe0346520cc93546b785e6c8797898695e14e.tar.bz2 historical-229fe0346520cc93546b785e6c8797898695e14e.zip |
Update version
Diffstat (limited to 'sys-devel')
5 files changed, 631 insertions, 4 deletions
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest index fa0cbcb988c7..079754fd11f5 100644 --- a/sys-devel/binutils/Manifest +++ b/sys-devel/binutils/Manifest @@ -8,14 +8,13 @@ MD5 e7df35e2bb31fb0268d2150da19b27b9 binutils-2.14.90.0.4.ebuild 4842 MD5 5ed1c40a92233028ce782a0c337603d9 binutils-2.13.90.0.16-r1.ebuild 4740 MD5 5690182afbd4c3cc29eff36bf253bdad binutils-2.14.90.0.5.ebuild 5127 MD5 368c85b995c3ab74a32a09e573aba1f9 binutils-2.12.90.0.15.ebuild 3512 -MD5 5fa31a72b53f309e52c091bfa37e3772 ChangeLog 13488 -MD5 3dedb0d7d287438e08f1eb0a3cff6655 binutils-2.14.90.0.6.ebuild 5363 -MD5 340b4b167108f42760f3ee4a7cd90315 .binutils-2.14.90.0.5-r1.ebuild.swp 20480 +MD5 79bb499e4ad1f195c106d5fc0a566240 ChangeLog 13733 +MD5 92899f50da78ca1774690fa292545dca binutils-2.14.90.0.6.ebuild 5055 MD5 011c5a33d84072e1af09ccf89cba6d61 binutils-2.11.92.0.7.ebuild 2357 MD5 39c137509f3ea2ab526bb092b10a9c54 binutils-2.11.92.0.12.3-r2.ebuild 3055 MD5 2e588e007eb122eb471c48aefcb04a41 binutils-2.14.90.0.1-r1.ebuild 5097 MD5 8e8914eebb88c363a128964a7941d66c binutils-2.14.90.0.4.1-r1.ebuild 5806 -MD5 3dedb0d7d287438e08f1eb0a3cff6655 binutils-2.14.90.0.5-r1.ebuild 5363 +MD5 e03dd3aa040f93c1afe6797b7b030042 binutils-2.14.90.0.5-r1.ebuild 5301 MD5 f2fca878c36319fd0efd1606f4baf24e files/digest-binutils-2.14.90.0.5 75 MD5 64f2cf145447cc0996540814afb15c68 files/digest-binutils-2.12.90.0.7 74 MD5 c2028bfe76e16c23a00a4ad36a5a36f2 files/digest-binutils-2.14.90.0.4.1-r1 77 @@ -88,5 +87,6 @@ MD5 3793ff770ff2fca80a2238f8de0a165e files/2.14/binutils-2.14.90.0.4-pie2.patch MD5 c1a6d53bb2eb89124a74f47b0bca0b89 files/2.14/binutils-2.14.90.0.5-ppc64-pie.patch 581 MD5 613770b55db9f6e3c11f040a94c9c4ea files/2.14/binutils-2.14.90.0.4-cfi4.patch 11909 MD5 60ff948d89725566178e8149375c3f31 files/2.14/binutils-2.14.90.0.4-gas-execstack.patch 3379 +MD5 09de3fa664f792872af4d6a029909315 files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch 14503 MD5 5fa7bd6f7e2c4fa50b74367a85f37541 files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch 4721 MD5 e7283a4967ce5101a016b31e747e8442 files/2.14/binutils-2.14.90.0.4-cfi2.patch 18449 diff --git a/sys-devel/binutils/binutils-2.14.90.0.6.ebuild b/sys-devel/binutils/binutils-2.14.90.0.6.ebuild new file mode 100644 index 000000000000..94767896f598 --- /dev/null +++ b/sys-devel/binutils/binutils-2.14.90.0.6.ebuild @@ -0,0 +1,177 @@ +# 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.ebuild,v 1.1 2003/08/24 14:23:11 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" + +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-eh-frame-ro.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 + 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 + + 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.5-place-orphan.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-place-orphan.patch new file mode 100644 index 000000000000..518284188fbd --- /dev/null +++ b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-place-orphan.patch @@ -0,0 +1,51 @@ +2003-08-05 Jakub Jelinek <jakub@redhat.com> + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): If secname + is in the linker script but os->bfd_section is NULL, use + output_prev_sec_find to place it on the right place in the section + list. + * emulparams/elf64ppc.sh (OTHER_GOT_RELOC_SECTIONS): Add .rela.opd. + +--- ld/emulparams/elf64ppc.sh.jj 2003-07-28 10:24:45.000000000 -0400 ++++ ld/emulparams/elf64ppc.sh 2003-08-05 08:35:58.000000000 -0400 +@@ -28,7 +28,8 @@ else + .toc 0 : { *(.toc) }" + fi + OTHER_GOT_RELOC_SECTIONS=" +- .rela.toc ${RELOCATING-0} : { *(.rela.toc) }" ++ .rela.toc ${RELOCATING-0} : { *(.rela.toc) } ++ .rela.opd ${RELOCATING-0} : { *(.rela.opd) }" + OTHER_READWRITE_SECTIONS=" + .toc1 ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc1) } + .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { KEEP (*(.opd)) }" +--- ld/emultempl/elf32.em.jj 2003-08-05 06:59:49.000000000 -0400 ++++ ld/emultempl/elf32.em 2003-08-05 08:27:23.000000000 -0400 +@@ -1138,7 +1138,27 @@ gld${EMULATION_NAME}_place_orphan (lang_ + { + /* We already have an output section statement with this + name, and its bfd section, if any, has compatible flags. */ +- lang_add_section (&os->children, s, os, file); ++ if (os->bfd_section != NULL) ++ lang_add_section (&os->children, s, os, file); ++ else ++ { ++ asection *prev_section = output_prev_sec_find (os); ++ lang_add_section (&os->children, s, os, file); ++ if (prev_section != NULL) ++ { ++ asection *snew = os->bfd_section, **pps; ++ ++ /* Unlink the section. */ ++ for (pps = &output_bfd->sections; *pps != snew; ++ pps = &(*pps)->next) ++ ; ++ bfd_section_list_remove (output_bfd, pps); ++ ++ /* Now tack it on to the "os" section list. */ ++ bfd_section_list_insert (output_bfd, &prev_section->next, ++ snew); ++ } ++ } + return TRUE; + } + } diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch new file mode 100644 index 000000000000..ec6660a6393e --- /dev/null +++ b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch @@ -0,0 +1,398 @@ +diff -urpN binutils-2.14.90.0.6/ld/emultempl/elf32.em binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/elf32.em +--- binutils-2.14.90.0.6/ld/emultempl/elf32.em 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/elf32.em 2003-08-24 14:56:13.112585536 +0200 +@@ -1016,7 +1016,8 @@ output_rel_find (asection *sec, int isdy + for (u = lang_output_section_statement.head; u; u = lookup->next) + { + lookup = &u->output_section_statement; +- if (strncmp (".rel", lookup->name, 4) == 0) ++ if (lookup->constraint != -1 ++ && strncmp (".rel", lookup->name, 4) == 0) + { + int lookrela = lookup->name[4] == 'a'; + +@@ -1264,7 +1265,7 @@ gld${EMULATION_NAME}_place_orphan (lang_ + (bfd_vma) 0, + (etree_type *) NULL, + (etree_type *) NULL, +- load_base); ++ load_base, 0); + + lang_add_section (&os->children, s, os, file); + +diff -urpN binutils-2.14.90.0.6/ld/emultempl/mmo.em binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/mmo.em +--- binutils-2.14.90.0.6/ld/emultempl/mmo.em 2003-07-23 17:08:12.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/mmo.em 2003-08-24 14:56:13.105586600 +0200 +@@ -47,6 +47,8 @@ output_prev_sec_find (lang_output_sectio + u = lookup->next) + { + lookup = &u->output_section_statement; ++ if (lookup->constraint == -1) ++ continue; + if (lookup == os) + break; + if (lookup->bfd_section != NULL +@@ -130,7 +132,7 @@ mmo_place_orphan (lang_input_statement_t + (bfd_vma) 0, + (etree_type *) NULL, + (etree_type *) NULL, +- (etree_type *) NULL); ++ (etree_type *) NULL, 0); + + lang_add_section (&os->children, s, os, file); + +diff -urpN binutils-2.14.90.0.6/ld/emultempl/pe.em binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/pe.em +--- binutils-2.14.90.0.6/ld/emultempl/pe.em 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/emultempl/pe.em 2003-08-24 14:56:13.108586144 +0200 +@@ -1453,6 +1453,8 @@ output_prev_sec_find (lang_output_sectio + u = lookup->next) + { + lookup = &u->output_section_statement; ++ if (lookup->constraint == -1) ++ continue; + if (lookup == os) + return s; + +@@ -1617,7 +1619,7 @@ gld_${EMULATION_NAME}_place_orphan (lang + (bfd_vma) 0, + (etree_type *) NULL, + (etree_type *) NULL, +- (etree_type *) NULL); ++ (etree_type *) NULL, 0); + + lang_add_section (&add_child, s, os, file); + +diff -urpN binutils-2.14.90.0.6/ld/ldgram.y binutils-2.14.90.0.6.eh-frame-ro/ld/ldgram.y +--- binutils-2.14.90.0.6/ld/ldgram.y 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/ldgram.y 2003-08-24 14:59:55.391793960 +0200 +@@ -143,14 +143,14 @@ static int error_index; + %token ORIGIN FILL + %token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS + %token ALIGNMOD AT SUBALIGN PROVIDE +-%type <token> assign_op atype attributes_opt ++%type <token> assign_op atype attributes_opt sect_constraint + %type <name> filename + %token CHIP LIST SECT ABSOLUTE LOAD NEWLINE ENDWORD ORDER NAMEWORD ASSERT_K + %token FORMAT PUBLIC DEFSYMEND BASE ALIAS TRUNCATE REL + %token INPUT_SCRIPT INPUT_MRI_SCRIPT INPUT_DEFSYM CASE EXTERN START + %token <name> VERS_TAG VERS_IDENTIFIER + %token GLOBAL LOCAL VERSIONK INPUT_VERSION_SCRIPT +-%token KEEP ++%token KEEP ONLY_IF_RO ONLY_IF_RW + %token EXCLUDE_FILE + %type <versyms> vers_defns + %type <versnode> vers_tag +@@ -833,22 +833,29 @@ opt_subalign: + | { $$ = 0; } + ; + ++sect_constraint: ++ ONLY_IF_RO { $$ = ONLY_IF_RO; } ++ | ONLY_IF_RW { $$ = ONLY_IF_RW; } ++ | { $$ = 0; } ++ ; ++ + section: NAME { ldlex_expression(); } + opt_exp_with_type + opt_at + opt_subalign { ldlex_popstate (); ldlex_script (); } ++ sect_constraint + '{' + { + lang_enter_output_section_statement($1, $3, + sectype, +- 0, 0, $5, $4); ++ 0, 0, $5, $4, $7); + } + statement_list_opt + '}' { ldlex_popstate (); ldlex_expression (); } + memspec_opt memspec_at_opt phdr_opt fill_opt + { + ldlex_popstate (); +- lang_leave_output_section_statement ($15, $12, $14, $13); ++ lang_leave_output_section_statement ($16, $13, $15, $14); + } + opt_comma + {} +diff -urpN binutils-2.14.90.0.6/ld/ldlang.c binutils-2.14.90.0.6.eh-frame-ro/ld/ldlang.c +--- binutils-2.14.90.0.6/ld/ldlang.c 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/ldlang.c 2003-08-24 15:00:50.927351272 +0200 +@@ -562,7 +562,7 @@ lang_memory_default (asection *section) + } + + lang_output_section_statement_type * +-lang_output_section_find (const char *const name) ++lang_output_section_find_1 (const char *const name, int constraint) + { + lang_statement_union_type *u; + lang_output_section_statement_type *lookup; +@@ -570,18 +570,26 @@ lang_output_section_find (const char *co + for (u = lang_output_section_statement.head; u != NULL; u = lookup->next) + { + lookup = &u->output_section_statement; +- if (strcmp (name, lookup->name) == 0) ++ if (strcmp (name, lookup->name) == 0 ++ && lookup->constraint != -1 ++ && (constraint == 0 || constraint == lookup->constraint)) + return lookup; + } + return NULL; + } + + lang_output_section_statement_type * +-lang_output_section_statement_lookup (const char *const name) ++lang_output_section_find (const char *const name) ++{ ++ return lang_output_section_find_1 (name, 0); ++} ++ ++lang_output_section_statement_type * ++lang_output_section_statement_lookup_1 (const char *const name, int constraint) + { + lang_output_section_statement_type *lookup; + +- lookup = lang_output_section_find (name); ++ lookup = lang_output_section_find_1 (name, constraint); + if (lookup == NULL) + { + lookup = new_stat (lang_output_section_statement, stat_ptr); +@@ -594,6 +602,7 @@ lang_output_section_statement_lookup (co + lookup->next = NULL; + lookup->bfd_section = NULL; + lookup->processed = FALSE; ++ lookup->constraint = constraint; + lookup->sectype = normal_section; + lookup->addr_tree = NULL; + lang_list_init (&lookup->children); +@@ -613,6 +622,12 @@ lang_output_section_statement_lookup (co + return lookup; + } + ++lang_output_section_statement_type * ++lang_output_section_statement_lookup (const char *const name) ++{ ++ return lang_output_section_statement_lookup_1 (name, 0); ++} ++ + static void + lang_map_flags (flagword flag) + { +@@ -1278,6 +1293,30 @@ output_section_callback (lang_wild_state + } + } + ++/* Check if all sections in a wild statement for a particular FILE ++ are readonly. */ ++ ++static void ++check_section_callback (lang_wild_statement_type *ptr ATTRIBUTE_UNUSED, ++ struct wildcard_list *sec ATTRIBUTE_UNUSED, ++ asection *section, ++ lang_input_statement_type *file ATTRIBUTE_UNUSED, ++ void *output) ++{ ++ /* Exclude sections that match UNIQUE_SECTION_LIST. */ ++ if (unique_section_p (bfd_get_section_name (file->the_bfd, section))) ++ return; ++ ++ if (section->output_section == NULL) ++ { ++ flagword flags = bfd_get_section_flags (section->owner, section); ++ ++ if ((flags & SEC_READONLY) == 0) ++ ((lang_output_section_statement_type *) output)->all_input_readonly ++ = FALSE; ++ } ++} ++ + /* This is passed a file name which must have been seen already and + added to the statement tree. We will see if it has been opened + already and had its symbols read. If not then we'll read it. */ +@@ -1923,6 +1962,40 @@ lang_place_undefineds (void) + insert_undefined (ptr->name); + } + ++/* Check for all readonly or some readwrite sections. */ ++ ++static void ++check_input_sections (lang_statement_union_type *s, ++ lang_output_section_statement_type *output_section_statement) ++{ ++ for (; s != (lang_statement_union_type *) NULL; s = s->header.next) ++ { ++ switch (s->header.type) ++ { ++ case lang_wild_statement_enum: ++ walk_wild (&s->wild_statement, check_section_callback, ++ output_section_statement); ++ if (! output_section_statement->all_input_readonly) ++ return; ++ break; ++ case lang_constructors_statement_enum: ++ check_input_sections (constructor_list.head, ++ output_section_statement); ++ if (! output_section_statement->all_input_readonly) ++ return; ++ break; ++ case lang_group_statement_enum: ++ check_input_sections (s->group_statement.children.head, ++ output_section_statement); ++ if (! output_section_statement->all_input_readonly) ++ return; ++ break; ++ default: ++ break; ++ } ++ } ++} ++ + /* Open input files and attach to output sections. */ + + static void +@@ -1943,6 +2016,23 @@ map_input_to_output_sections + output_section_statement); + break; + case lang_output_section_statement_enum: ++ if (s->output_section_statement.constraint) ++ { ++ if (s->output_section_statement.constraint == -1) ++ break; ++ s->output_section_statement.all_input_readonly = TRUE; ++ check_input_sections (s->output_section_statement.children.head, ++ &s->output_section_statement); ++ if ((s->output_section_statement.all_input_readonly ++ && s->output_section_statement.constraint == ONLY_IF_RW) ++ || (!s->output_section_statement.all_input_readonly ++ && s->output_section_statement.constraint == ONLY_IF_RO)) ++ { ++ s->output_section_statement.constraint = -1; ++ break; ++ } ++ } ++ + map_input_to_output_sections (s->output_section_statement.children.head, + target, + &s->output_section_statement); +@@ -2013,6 +2103,8 @@ strip_excluded_output_sections (void) + asection *s; + + os = &u->output_section_statement; ++ if (os->constraint == -1) ++ continue; + s = os->bfd_section; + if (s != NULL && (s->flags & SEC_EXCLUDE) != 0) + { +@@ -3857,13 +3949,15 @@ lang_enter_output_section_statement (con + bfd_vma block_value, + etree_type *align, + etree_type *subalign, +- etree_type *ebase) ++ etree_type *ebase, ++ int constraint) + { + lang_output_section_statement_type *os; + + current_section = + os = +- lang_output_section_statement_lookup (output_section_statement_name); ++ lang_output_section_statement_lookup_1 (output_section_statement_name, ++ constraint); + + /* Add this statement to tree. */ + #if 0 +@@ -4558,6 +4652,8 @@ lang_record_phdrs (void) + struct lang_output_section_phdr_list *pl; + + os = &u->output_section_statement; ++ if (os->constraint == -1) ++ continue; + + pl = os->phdrs; + if (pl != NULL) +@@ -4617,7 +4713,8 @@ lang_record_phdrs (void) + { + struct lang_output_section_phdr_list *pl; + +- if (u->output_section_statement.bfd_section == NULL) ++ if (u->output_section_statement.constraint == -1 ++ || u->output_section_statement.bfd_section == NULL) + continue; + + for (pl = u->output_section_statement.phdrs; +@@ -4689,7 +4786,7 @@ lang_enter_overlay_section (const char * + etree_type *size; + + lang_enter_output_section_statement (name, overlay_vma, normal_section, +- 0, 0, overlay_subalign, 0); ++ 0, 0, overlay_subalign, 0, 0); + + /* If this is the first section, then base the VMA of future + sections on this one. This will work correctly even if `.' is +diff -urpN binutils-2.14.90.0.6/ld/ldlang.h binutils-2.14.90.0.6.eh-frame-ro/ld/ldlang.h +--- binutils-2.14.90.0.6/ld/ldlang.h 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/ldlang.h 2003-08-24 14:56:13.123583864 +0200 +@@ -132,6 +132,8 @@ typedef struct lang_output_section_state + + int subsection_alignment; /* alignment of components */ + int section_alignment; /* alignment of start of section */ ++ int constraint; ++ bfd_boolean all_input_readonly; + + union etree_union *load_base; + +@@ -394,7 +396,7 @@ extern lang_output_section_statement_typ + bfd_vma block_value, + etree_type *align, + etree_type *subalign, +- etree_type *); ++ etree_type *, int); + extern void lang_final + (void); + extern void lang_process +diff -urpN binutils-2.14.90.0.6/ld/ldlex.l binutils-2.14.90.0.6.eh-frame-ro/ld/ldlex.l +--- binutils-2.14.90.0.6/ld/ldlex.l 2003-08-21 17:28:48.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/ldlex.l 2003-08-24 14:56:13.136581888 +0200 +@@ -299,6 +299,8 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^]([*? + <EXPRESSION,BOTH,SCRIPT>"COPY" { RTOKEN(COPY);} + <EXPRESSION,BOTH,SCRIPT>"INFO" { RTOKEN(INFO);} + <EXPRESSION,BOTH,SCRIPT>"OVERLAY" { RTOKEN(OVERLAY);} ++<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RO" { RTOKEN(ONLY_IF_RO); } ++<EXPRESSION,BOTH,SCRIPT>"ONLY_IF_RW" { RTOKEN(ONLY_IF_RW); } + <BOTH,SCRIPT>"o" { RTOKEN(ORIGIN);} + <BOTH,SCRIPT>"org" { RTOKEN(ORIGIN);} + <BOTH,SCRIPT>"l" { RTOKEN( LENGTH);} +diff -urpN binutils-2.14.90.0.6/ld/mri.c binutils-2.14.90.0.6.eh-frame-ro/ld/mri.c +--- binutils-2.14.90.0.6/ld/mri.c 2003-07-23 17:08:12.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/mri.c 2003-08-24 14:56:13.121584168 +0200 +@@ -220,7 +220,7 @@ mri_draw_tree (void) + + lang_enter_output_section_statement (p->name, base, + p->ok_to_load ? 0 : noload_section, +- 1, align, subalign, NULL); ++ 1, align, subalign, NULL, 0); + base = 0; + tmp = xmalloc (sizeof *tmp); + tmp->next = NULL; +diff -urpN binutils-2.14.90.0.6/ld/scripttempl/elf.sc binutils-2.14.90.0.6.eh-frame-ro/ld/scripttempl/elf.sc +--- binutils-2.14.90.0.6/ld/scripttempl/elf.sc 2003-07-23 17:08:12.000000000 +0200 ++++ binutils-2.14.90.0.6.eh-frame-ro/ld/scripttempl/elf.sc 2003-08-24 14:56:13.115585080 +0200 +@@ -283,6 +283,8 @@ cat <<EOF + ${CREATE_SHLIB-${SBSS2}} + ${OTHER_READONLY_SECTIONS} + .eh_frame_hdr : { *(.eh_frame_hdr) } ++ .eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) } ++ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RO { *(.gcc_except_table) } + + /* Adjust the address for the data segment. We want to adjust up to + the same address within the page on the next page up. */ +@@ -316,8 +318,8 @@ cat <<EOF + .data1 ${RELOCATING-0} : { *(.data1) } + .tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) } + .tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} } +- .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) } +- .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) } ++ .eh_frame ${RELOCATING-0} : ONLY_IF_RW { KEEP (*(.eh_frame)) } ++ .gcc_except_table ${RELOCATING-0} : ONLY_IF_RW { *(.gcc_except_table) } + ${WRITABLE_RODATA+${RODATA}} + ${OTHER_READWRITE_SECTIONS} + ${TEXT_DYNAMIC-${DYNAMIC}} diff --git a/sys-devel/binutils/files/digest-binutils-2.14.90.0.6 b/sys-devel/binutils/files/digest-binutils-2.14.90.0.6 new file mode 100644 index 000000000000..26abe27b6c76 --- /dev/null +++ b/sys-devel/binutils/files/digest-binutils-2.14.90.0.6 @@ -0,0 +1 @@ +MD5 71b99dba3045a359dc314dbebedcf502 binutils-2.14.90.0.6.tar.bz2 10399066 |