diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-04-11 05:56:50 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-04-11 05:56:50 +0000 |
commit | 7d58cba3e62d85e97436919da84164251b0c6ab4 (patch) | |
tree | a8ccbad2e8d9c01ffc708297c261d934d892ef6f /sys-devel | |
parent | include LINGUAS env var (diff) | |
download | gentoo-2-7d58cba3e62d85e97436919da84164251b0c6ab4.tar.gz gentoo-2-7d58cba3e62d85e97436919da84164251b0c6ab4.tar.bz2 gentoo-2-7d58cba3e62d85e97436919da84164251b0c6ab4.zip |
moved to patch tarballs ... find em in cvs at gentoo/src/patchsets/binutils/
Diffstat (limited to 'sys-devel')
53 files changed, 0 insertions, 10224 deletions
diff --git a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-glibc21.patch b/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-glibc21.patch deleted file mode 100644 index b3ffa8e789bd..000000000000 --- a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-glibc21.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- binutils-2.13.90.0.10/ld/emulparams/elf_i386_glibc21.sh.glibc21 2002-11-15 15:12:42.000000000 +0100 -+++ binutils-2.13.90.0.10/ld/emulparams/elf_i386_glibc21.sh 2002-11-15 15:12:42.000000000 +0100 -@@ -0,0 +1,11 @@ -+SCRIPT_NAME=elf -+OUTPUT_FORMAT="elf32-i386" -+TEXT_START_ADDR=0x08048000 -+MAXPAGESIZE=0x1000 -+NONPAGED_TEXT_START_ADDR=0x08048000 -+ARCH=i386 -+MACHINE= -+NOP=0x9090 -+TEMPLATE_NAME=elf32 -+GENERATE_SHLIB_SCRIPT=yes -+LIB_PATH=/usr/i386-glibc21-linux/lib:/usr/local/lib ---- binutils-2.13.90.0.10/ld/configure.tgt.glibc21 2002-10-10 06:09:41.000000000 +0200 -+++ binutils-2.13.90.0.10/ld/configure.tgt 2002-11-15 15:14:38.000000000 +0100 -@@ -147,6 +147,8 @@ i[3456]86-*-linux-gnu*) targ_emul=elf_i3 - if test x${want64} = xtrue; then - targ_extra_emuls="$targ_extra_emuls elf_x86_64" - fi -+ targ_extra_emuls="i386linux elf_i386_glibc21" -+ targ_extra_libpath=elf_i386_glibc21 - tdir_i386linux=${targ_alias}aout - ;; - x86_64-*-linux-gnu*) targ_emul=elf_x86_64 ---- binutils-2.13.90.0.10/ld/Makefile.am.glibc21 2002-10-10 06:09:41.000000000 +0200 -+++ binutils-2.13.90.0.10/ld/Makefile.am 2002-11-15 15:12:42.000000000 +0100 -@@ -185,6 +185,7 @@ ALL_EMULATIONS = \ - eelf_i386_be.o \ - eelf_i386_chaos.o \ - eelf_i386_fbsd.o \ -+ eelf_i386_glibc21.o \ - eelf_i386_ldso.o \ - eelf_s390.o \ - egld960.o \ -@@ -734,6 +735,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf - eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)" -+eelf_i386_glibc21.c: $(srcdir)/emulparams/elf_i386_glibc21.sh \ -+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf_i386_glibc21 "$(tdir_elf_i386_glibc21)" - eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \ - $(srcdir)/emulparams/elf_i386.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ---- binutils-2.13.90.0.10/ld/Makefile.in.glibc21 2002-10-10 06:09:41.000000000 +0200 -+++ binutils-2.13.90.0.10/ld/Makefile.in 2002-11-15 15:12:42.000000000 +0100 -@@ -295,6 +295,7 @@ ALL_EMULATIONS = \ - eelf_i386.o \ - eelf_i386_be.o \ - eelf_i386_chaos.o \ -+ eelf_i386_glibc21.o \ - eelf_i386_fbsd.o \ - eelf_i386_ldso.o \ - eelf_s390.o \ -@@ -1457,6 +1458,9 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf - eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf_chaos.sc ${GEN_DEPENDS} - ${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)" -+eelf_i386_glibc21.c: $(srcdir)/emulparams/elf_i386_glibc21.sh \ -+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} -+ ${GENSCRIPTS} elf_i386_glibc21 "$(tdir_elf_i386_glibc21)" - eelf_i386_fbsd.c: $(srcdir)/emulparams/elf_i386_fbsd.sh \ - $(srcdir)/emulparams/elf_i386.sh \ - $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff --git a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-gotpcrel.patch b/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-gotpcrel.patch deleted file mode 100644 index 9c895d45a3dc..000000000000 --- a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-gotpcrel.patch +++ /dev/null @@ -1,19 +0,0 @@ -2002-08-26 Jan Hubicka <jh@suse.cz> - - * tc-i386.c (tc_i386_fix_adjustable): Recognize GOTPCREL properly. - ---- binutils-2.13.90.0.10/gas/config/tc-i386.c.x86_64-gotpcrel 2002-11-15 15:16:42.000000000 +0100 -+++ binutils-2.13.90.0.10/gas/config/tc-i386.c 2002-11-15 15:22:40.000000000 +0100 -@@ -1220,6 +1220,12 @@ tc_i386_fix_adjustable (fixP) - && fixP->fx_pcrel) - return 0; - -+ /* The x86_64 GOTPCREL are represented as 32bit PCrel relocations -+ and changed later by validate_fix. */ -+ if (GOT_symbol && fixP->fx_subsy == GOT_symbol -+ && fixP->fx_r_type == BFD_RELOC_32_PCREL) -+ return 0; -+ - /* adjust_reloc_syms doesn't know about the GOT. */ - if (fixP->fx_r_type == BFD_RELOC_386_GOTOFF - || fixP->fx_r_type == BFD_RELOC_386_PLT32 diff --git a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-testsuite.patch b/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-testsuite.patch deleted file mode 100644 index 2fc380f60358..000000000000 --- a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.10-x86_64-testsuite.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- binutils-2.13.90.0.10/ld/testsuite/ld-selective/selective.exp.x86_64-testsuite 2002-08-14 19:35:11.000000000 +0200 -+++ binutils-2.13.90.0.10/ld/testsuite/ld-selective/selective.exp 2002-11-15 15:22:22.000000000 +0100 -@@ -50,11 +50,11 @@ if {[istarget "alpha*-*-*"]} { - # - # FIXME: Instead of table, read settings from each source-file. - set seltests { -- {selective1 C 1.c {} {} {dropme1 dropme2} {alpha*-*}} -- {selective2 C 2.c {} {} {foo} {alpha*-* mips*-*}} -+ {selective1 C 1.c {} {} {dropme1 dropme2} {alpha*-* x86_64*-*}} -+ {selective2 C 2.c {} {} {foo} {alpha*-* mips*-* x86_64*-*}} - {selective3 C 2.c {-u foo} {foo} {{foo 0}} {mips*-*}} -- {selective4 C++ 3.cc {} {start a A::foo() B::foo()} {A::bar()} {alpha*-* mips*-*}} -- {selective5 C++ 4.cc {} {start a A::bar()} {A::foo() B::foo()} {alpha*-* mips*-*}} -+ {selective4 C++ 3.cc {} {start a A::foo() B::foo()} {A::bar()} {alpha*-* mips*-* x86_64*-*}} -+ {selective5 C++ 4.cc {} {start a A::bar()} {A::foo() B::foo()} {alpha*-* mips*-* x86_64*-*}} - {selective6 C++ 5.cc {} {start a A::bar()} - {A::foo() B::foo() dropme1() dropme2()} {*-*-*}} - } diff --git a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.18-testsuite-Wall-fixes.patch b/sys-devel/binutils/files/2.13/binutils-2.13.90.0.18-testsuite-Wall-fixes.patch deleted file mode 100644 index 213c2032effb..000000000000 --- a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.18-testsuite-Wall-fixes.patch +++ /dev/null @@ -1,32 +0,0 @@ -2003-02-15 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> - - * ld/testsuite/ld-shared/main.c (main): -Wall fixes. - ---- binutils-2.13.90.0.18/ld/testsuite/ld-shared/main.c.testsuite-Wall-fixes 2001-06-09 03:13:02.000000000 -0400 -+++ binutils-2.13.90.0.18/ld/testsuite/ld-shared/main.c 2003-02-15 03:47:05.000000000 -0500 -@@ -38,8 +38,6 @@ shlib_overriddencall2 () - int - main () - { -- int (*p) (); -- - printf ("mainvar == %d\n", mainvar); - printf ("overriddenvar == %d\n", overriddenvar); - printf ("shlibvar1 == %d\n", shlibvar1); -@@ -62,6 +60,8 @@ main () - printf ("shlib_checkfunptr2 (main_called) == %d\n", - shlib_checkfunptr2 (main_called)); - #endif -+ { -+ int (*p) (); - p = shlib_getfunptr1 (); - printf ("shlib_getfunptr1 () "); - if (p == shlib_shlibvar1) -@@ -78,6 +78,7 @@ main () - printf ("!="); - printf (" main_called\n"); - #endif -+ } - #endif - printf ("shlib_check () == %d\n", shlib_check ()); - return 0; diff --git a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch b/sys-devel/binutils/files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch deleted file mode 100644 index 2f2993ffe5b3..000000000000 --- a/sys-devel/binutils/files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- ld/scripttempl/elf.sc.array-sects-compat~ 2003-01-03 22:21:16.000000000 -0200 -+++ ld/scripttempl/elf.sc 2003-01-03 22:27:42.000000000 -0200 -@@ -288,6 +288,17 @@ - ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} - ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} - -+ /* For backward-compatibility with tools that don't support the -+ *_array_* sections below, our glibc's crt files contain weak -+ definitions of symbols that they reference. We don't want to use -+ them, though, unless they're strictly necessary, because they'd -+ bring us empty sections, unlike PROVIDE below, so we drop the -+ sections from the crt files here. */ -+ /DISCARD/ : { -+ */crti.o(.init_array .fini_array .preinit_array) -+ */crtn.o(.init_array .fini_array .preinit_array) -+ } -+ - /* Ensure the __preinit_array_start label is properly aligned. We - could instead move the label definition inside the section, but - the linker would then create the section even if it turns out to diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch deleted file mode 100644 index ce4fc4db8944..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch +++ /dev/null @@ -1,484 +0,0 @@ -2002-11-22 Jakub Jelinek <jakub@redhat.com> - - * ldgram.y (sect_constraint): New. - (ONLY_IF_RO, ONLY_IF_RW): New tokens. - (section): Add sect_constraint. Pass additional argument - to lang_enter_output_section_statement. - * mri.c (mri_draw_tree): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/pe.em (place_orphan): Likewise. - (output_prev_sec_find): Disregard output section statements with - constraint == -1. - * emultempl/mmo.em (output_prev_sec_find): Likewise. - (mmo_place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/elf32.em (output_prev_sec_find): Disregard output section - statements with constraint == -1. - (place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * ldlang.c (lang_enter_overlay_section): Likewise. - (lang_output_section_find_1): New. - (lang_output_section_find): Use it. - (lang_output_section_statement_lookup_1): New. - (lang_output_section_statement_lookup): Use it. - (check_section_callback, check_input_sections): New. - (map_input_to_output_sections): Check if all input sections - are readonly if ONLY_IF_RO or ONLY_IF_RW was seen. - (strip_excluded_output_sections): Disregard output section statements - with constraint == -1. - (lang_record_phdrs): Likewise. - (lang_enter_output_section_statement): Add constraint argument. - Use lang_output_section_statement_lookup_1. - * ldlang.h (lang_output_section_statement_type): Add constraint - and all_input_readonly fields. - (lang_enter_output_section_statement): Adjust prototype. - * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens. - * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text - segment if all input sections are readonly. - -diff -Naurp binutils-2.13.90.0.20.orig/ld/emultempl/elf32.em binutils-2.13.90.0.20/ld/emultempl/elf32.em ---- binutils-2.13.90.0.20.orig/ld/emultempl/elf32.em 2003-03-19 12:19:16.000000000 -0500 -+++ binutils-2.13.90.0.20/ld/emultempl/elf32.em 2003-05-01 15:52:02.000000000 -0400 -@@ -1056,7 +1056,8 @@ output_rel_find (sec) - 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) - { - /* Don't place after .rel.plt as doing so results in wrong - dynamic tags. Also, place allocated reloc sections before -@@ -1296,7 +1297,7 @@ gld${EMULATION_NAME}_place_orphan (file, - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, -- load_base); -+ load_base, 0); - - lang_add_section (&os->children, s, os, file); - -diff -Naurp binutils-2.13.90.0.20.orig/ld/emultempl/mmo.em binutils-2.13.90.0.20/ld/emultempl/mmo.em ---- binutils-2.13.90.0.20.orig/ld/emultempl/mmo.em 2002-12-16 15:22:53.000000000 -0500 -+++ binutils-2.13.90.0.20/ld/emultempl/mmo.em 2003-05-01 15:52:02.000000000 -0400 -@@ -56,6 +56,8 @@ output_prev_sec_find (os) - u = lookup->next) - { - lookup = &u->output_section_statement; -+ if (lookup->constraint == -1) -+ continue; - if (lookup == os) - break; - if (lookup->bfd_section != NULL -@@ -141,7 +143,7 @@ mmo_place_orphan (file, s) - (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 -Naurp binutils-2.13.90.0.20.orig/ld/emultempl/pe.em binutils-2.13.90.0.20/ld/emultempl/pe.em ---- binutils-2.13.90.0.20.orig/ld/emultempl/pe.em 2003-05-01 15:49:44.000000000 -0400 -+++ binutils-2.13.90.0.20/ld/emultempl/pe.em 2003-05-01 15:52:02.000000000 -0400 -@@ -1511,6 +1511,8 @@ output_prev_sec_find (os) - u = lookup->next) - { - lookup = &u->output_section_statement; -+ if (lookup->constraint == -1) -+ continue; - if (lookup == os) - return s; - -@@ -1677,7 +1679,7 @@ gld_${EMULATION_NAME}_place_orphan (file - (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 -Naurp binutils-2.13.90.0.20.orig/ld/ldgram.y binutils-2.13.90.0.20/ld/ldgram.y ---- binutils-2.13.90.0.20.orig/ld/ldgram.y 2003-05-01 15:49:45.000000000 -0400 -+++ binutils-2.13.90.0.20/ld/ldgram.y 2003-05-01 15:55:29.000000000 -0400 -@@ -143,14 +143,14 @@ static int error_index; - %token ORIGIN FILL - %token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS - %token ALIGNMOD AT 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 -@@ -828,21 +828,28 @@ opt_at: - | { $$ = 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 { ldlex_popstate (); ldlex_script (); } -+ sect_constraint - '{' - { - lang_enter_output_section_statement($1, $3, - sectype, -- 0, 0, 0, $4); -+ 0, 0, 0, $4, $6); - } - statement_list_opt - '}' { ldlex_popstate (); ldlex_expression (); } - memspec_opt memspec_at_opt phdr_opt fill_opt - { - ldlex_popstate (); -- lang_leave_output_section_statement ($14, $11, $13, $12); -+ lang_leave_output_section_statement ($15, $12, $14, $13); - } - opt_comma - {} -diff -Naurp binutils-2.13.90.0.20.orig/ld/ldlang.c binutils-2.13.90.0.20/ld/ldlang.c ---- binutils-2.13.90.0.20.orig/ld/ldlang.c 2003-05-01 15:49:45.000000000 -0400 -+++ binutils-2.13.90.0.20/ld/ldlang.c 2003-05-01 15:52:02.000000000 -0400 -@@ -72,6 +72,10 @@ static lang_input_statement_type *new_af - bfd_boolean)); - static lang_memory_region_type *lang_memory_default - PARAMS ((asection *)); -+static lang_output_section_statement_type * lang_output_section_find_1 -+ PARAMS ((const char *, int)); -+static lang_output_section_statement_type * -+ lang_output_section_statement_lookup_1 PARAMS ((const char *, int)); - static void lang_map_flags - PARAMS ((flagword)); - static void init_os -@@ -94,6 +98,9 @@ static lang_statement_union_type *wild_s - static void output_section_callback - PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *, - lang_input_statement_type *, PTR)); -+static void check_section_callback -+ PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *, -+ lang_input_statement_type *, PTR)); - static lang_input_statement_type *lookup_name - PARAMS ((const char *)); - static bfd_boolean load_symbols -@@ -111,6 +118,9 @@ static void lang_reasonable_defaults - PARAMS ((void)); - static void insert_undefined - PARAMS ((const char *)); -+static void check_input_sections -+ PARAMS ((lang_statement_union_type *, -+ lang_output_section_statement_type *)); - static void lang_place_undefineds - PARAMS ((void)); - static void map_input_to_output_sections -@@ -745,9 +755,10 @@ lang_memory_default (section) - return lang_memory_region_lookup ("*default*"); - } - --lang_output_section_statement_type * --lang_output_section_find (name) -+static lang_output_section_statement_type * -+lang_output_section_find_1 (name, constraint) - const char *const name; -+ int constraint; - { - lang_statement_union_type *u; - lang_output_section_statement_type *lookup; -@@ -757,7 +768,9 @@ lang_output_section_find (name) - 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; - } -@@ -766,12 +779,20 @@ lang_output_section_find (name) - } - - lang_output_section_statement_type * --lang_output_section_statement_lookup (name) -+lang_output_section_find (name) -+ const char *const name; -+{ -+ return lang_output_section_find_1 (name, 0); -+} -+ -+static lang_output_section_statement_type * -+lang_output_section_statement_lookup_1 (name, constraint) - 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 == (lang_output_section_statement_type *) NULL) - { - -@@ -786,6 +807,7 @@ lang_output_section_statement_lookup (na - lookup->next = (lang_statement_union_type *) NULL; - lookup->bfd_section = (asection *) NULL; - lookup->processed = FALSE; -+ lookup->constraint = constraint; - lookup->sectype = normal_section; - lookup->addr_tree = (etree_type *) NULL; - lang_list_init (&lookup->children); -@@ -805,6 +827,13 @@ lang_output_section_statement_lookup (na - return lookup; - } - -+lang_output_section_statement_type * -+lang_output_section_statement_lookup (name) -+ const char *const name; -+{ -+ return lang_output_section_statement_lookup_1 (name, 0); -+} -+ - static void - lang_map_flags (flag) - flagword flag; -@@ -1482,6 +1511,31 @@ output_section_callback (ptr, sec, secti - } - } - -+/* Check if all sections in a wild statement for a particular FILE -+ are readonly. */ -+ -+static void -+check_section_callback (ptr, sec, section, file, output) -+ lang_wild_statement_type *ptr ATTRIBUTE_UNUSED; -+ struct wildcard_list *sec ATTRIBUTE_UNUSED; -+ asection *section; -+ lang_input_statement_type *file ATTRIBUTE_UNUSED; -+ PTR 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. */ -@@ -2151,6 +2205,41 @@ lang_place_undefineds () - } - } - -+/* Check for all readonly or some readwrite sections. */ -+ -+static void -+check_input_sections (s, output_section_statement) -+ 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 -@@ -2172,6 +2261,23 @@ map_input_to_output_sections (s, target, - 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); -@@ -2242,6 +2348,8 @@ strip_excluded_output_sections () - asection *s; - - os = &u->output_section_statement; -+ if (os->constraint == -1) -+ continue; - s = os->bfd_section; - if (s != NULL && (s->flags & SEC_EXCLUDE) != 0) - { -@@ -4116,7 +4224,7 @@ topower (x) - lang_output_section_statement_type * - lang_enter_output_section_statement (output_section_statement_name, - address_exp, sectype, block_value, -- align, subalign, ebase) -+ align, subalign, ebase, constraint) - const char *output_section_statement_name; - etree_type *address_exp; - enum section_type sectype; -@@ -4124,12 +4232,14 @@ lang_enter_output_section_statement (out - etree_type *align; - etree_type *subalign; - 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 -@@ -4855,6 +4965,8 @@ lang_record_phdrs () - struct lang_output_section_phdr_list *pl; - - os = &u->output_section_statement; -+ if (os->constraint == -1) -+ continue; - - pl = os->phdrs; - if (pl != NULL) -@@ -4915,7 +5027,8 @@ lang_record_phdrs () - { - 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; -@@ -4985,7 +5098,7 @@ lang_enter_overlay_section (name) - etree_type *size; - - lang_enter_output_section_statement (name, overlay_vma, normal_section, -- 0, 0, 0, 0); -+ 0, 0, 0, 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 -Naurp binutils-2.13.90.0.20.orig/ld/ldlang.h binutils-2.13.90.0.20/ld/ldlang.h ---- binutils-2.13.90.0.20.orig/ld/ldlang.h 2003-03-19 12:19:16.000000000 -0500 -+++ binutils-2.13.90.0.20/ld/ldlang.h 2003-05-01 15:52:02.000000000 -0400 -@@ -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 - PARAMS ((void)); - extern void lang_process -diff -Naurp binutils-2.13.90.0.20.orig/ld/ldlex.l binutils-2.13.90.0.20/ld/ldlex.l ---- binutils-2.13.90.0.20.orig/ld/ldlex.l 2003-05-01 15:49:45.000000000 -0400 -+++ binutils-2.13.90.0.20/ld/ldlex.l 2003-05-01 15:52:02.000000000 -0400 -@@ -303,6 +303,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 -Naurp binutils-2.13.90.0.20.orig/ld/mri.c binutils-2.13.90.0.20/ld/mri.c ---- binutils-2.13.90.0.20.orig/ld/mri.c 2003-01-21 13:21:34.000000000 -0500 -+++ binutils-2.13.90.0.20/ld/mri.c 2003-05-01 15:52:02.000000000 -0400 -@@ -237,7 +237,7 @@ mri_draw_tree () - lang_enter_output_section_statement (p->name, base, - p->ok_to_load ? 0 : noload_section, - 1, align, subalign, -- (etree_type *) NULL); -+ (etree_type *) NULL, 0); - base = 0; - tmp = (struct wildcard_list *) xmalloc (sizeof *tmp); - tmp->next = NULL; -diff -Naurp binutils-2.13.90.0.20.orig/ld/scripttempl/elf.sc binutils-2.13.90.0.20/ld/scripttempl/elf.sc ---- binutils-2.13.90.0.20.orig/ld/scripttempl/elf.sc 2003-05-01 15:49:45.000000000 -0400 -+++ binutils-2.13.90.0.20/ld/scripttempl/elf.sc 2003-05-01 15:52:02.000000000 -0400 -@@ -280,6 +280,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. */ -@@ -312,8 +314,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/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch deleted file mode 100644 index 78b55fe1e398..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch +++ /dev/null @@ -1,94 +0,0 @@ -2002-04-20 Jakub Jelinek <jakub@redhat.com> - - * elf32-sparc.c (elf32_sparc_relocate_section): Find real output - section with SEC_MERGE. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - ---- bfd/elf32-sparc.c.jj Thu Feb 6 08:07:10 2003 -+++ bfd/elf32-sparc.c Thu Feb 6 08:31:54 2003 -@@ -2168,7 +2168,7 @@ elf32_sparc_relocate_section (output_bfd - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - asection *sec; -- bfd_vma relocation, off; -+ bfd_vma relocation, off, orig_addend = 0; - bfd_reloc_status_type r; - bfd_boolean is_plt = FALSE; - bfd_boolean unresolved_reloc; -@@ -2196,6 +2196,7 @@ elf32_sparc_relocate_section (output_bfd - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -+ orig_addend = rel->r_addend; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); - } - else -@@ -2525,6 +2526,24 @@ elf32_sparc_relocate_section (output_bfd - asection *osec; - - osec = sec->output_section; -+ /* FIXME: As soon as making sections zero size -+ is possible, this if can go away. */ -+ if (bfd_is_abs_section (osec) -+ && h == NULL -+ && (sec->flags & SEC_MERGE) -+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION -+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE) -+ { -+ asection *msec; -+ -+ msec = sec; -+ _bfd_merged_section_offset (output_bfd, &msec, -+ elf_section_data (sec)->sec_info, -+ sym->st_value + orig_addend, -+ (bfd_vma) 0); -+ osec = msec->output_section; -+ } -+ - indx = elf_section_data (osec)->dynindx; - - /* FIXME: we really should be able to link non-pic ---- bfd/elf64-sparc.c.jj Thu Feb 6 08:07:10 2003 -+++ bfd/elf64-sparc.c Thu Feb 6 08:31:54 2003 -@@ -2016,7 +2016,7 @@ sparc64_elf_relocate_section (output_bfd - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - asection *sec; -- bfd_vma relocation, off; -+ bfd_vma relocation, off, orig_addend = 0; - bfd_reloc_status_type r; - bfd_boolean is_plt = FALSE; - bfd_boolean unresolved_reloc; -@@ -2039,6 +2039,7 @@ sparc64_elf_relocate_section (output_bfd - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -+ orig_addend = rel->r_addend; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); - } - else -@@ -2267,6 +2268,24 @@ sparc64_elf_relocate_section (output_bfd - asection *osec; - - osec = sec->output_section; -+ /* FIXME: As soon as making sections zero size -+ is possible, this if can go away. */ -+ if (bfd_is_abs_section (osec) -+ && h == NULL -+ && (sec->flags & SEC_MERGE) -+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION -+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE) -+ { -+ asection *msec; -+ -+ msec = sec; -+ _bfd_merged_section_offset (output_bfd, &msec, -+ elf_section_data (sec)->sec_info, -+ sym->st_value + orig_addend, -+ (bfd_vma) 0); -+ osec = msec->output_section; -+ } -+ - indx = elf_section_data (osec)->dynindx; - - /* We are turning this relocation into one diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch deleted file mode 100644 index 83b947df1b06..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch +++ /dev/null @@ -1,475 +0,0 @@ -2002-11-22 Jakub Jelinek <jakub@redhat.com> - - * ldgram.y (sect_constraint): New. - (ONLY_IF_RO, ONLY_IF_RW): New tokens. - (section): Add sect_constraint. Pass additional argument - to lang_enter_output_section_statement. - * mri.c (mri_draw_tree): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/pe.em (place_orphan): Likewise. - (output_prev_sec_find): Disregard output section statements with - constraint == -1. - * emultempl/mmo.em (output_prev_sec_find): Likewise. - (mmo_place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/elf32.em (output_prev_sec_find): Disregard output section - statements with constraint == -1. - (place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * ldlang.c (lang_enter_overlay_section): Likewise. - (lang_output_section_find_1): New. - (lang_output_section_find): Use it. - (lang_output_section_statement_lookup_1): New. - (lang_output_section_statement_lookup): Use it. - (check_section_callback, check_input_sections): New. - (map_input_to_output_sections): Check if all input sections - are readonly if ONLY_IF_RO or ONLY_IF_RW was seen. - (strip_excluded_output_sections): Disregard output section statements - with constraint == -1. - (lang_record_phdrs): Likewise. - (lang_enter_output_section_statement): Add constraint argument. - Use lang_output_section_statement_lookup_1. - * ldlang.h (lang_output_section_statement_type): Add constraint - and all_input_readonly fields. - (lang_enter_output_section_statement): Adjust prototype. - * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens. - * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text - segment if all input sections are readonly. - ---- ld/emultempl/mmo.em.jj Mon Dec 16 15:22:53 2002 -+++ ld/emultempl/mmo.em Mon May 19 06:31:40 2003 -@@ -56,6 +56,8 @@ output_prev_sec_find (os) - u = lookup->next) - { - lookup = &u->output_section_statement; -+ if (lookup->constraint == -1) -+ continue; - if (lookup == os) - break; - if (lookup->bfd_section != NULL -@@ -141,7 +143,7 @@ mmo_place_orphan (file, s) - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, -- (etree_type *) NULL); -+ (etree_type *) NULL, 0); - - lang_add_section (&os->children, s, os, file); - ---- ld/emultempl/pe.em.jj Mon May 5 17:46:50 2003 -+++ ld/emultempl/pe.em Mon May 19 06:31:40 2003 -@@ -1511,6 +1511,8 @@ output_prev_sec_find (os) - u = lookup->next) - { - lookup = &u->output_section_statement; -+ if (lookup->constraint == -1) -+ continue; - if (lookup == os) - return s; - -@@ -1677,7 +1679,7 @@ gld_${EMULATION_NAME}_place_orphan (file - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, -- (etree_type *) NULL); -+ (etree_type *) NULL, 0); - - lang_add_section (&add_child, s, os, file); - ---- ld/emultempl/elf32.em.jj Thu May 15 16:42:25 2003 -+++ ld/emultempl/elf32.em Mon May 19 06:31:40 2003 -@@ -1056,7 +1056,8 @@ output_rel_find (sec) - 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) - { - /* Don't place after .rel.plt as doing so results in wrong - dynamic tags. Also, place allocated reloc sections before -@@ -1296,7 +1297,7 @@ gld${EMULATION_NAME}_place_orphan (file, - (bfd_vma) 0, - (etree_type *) NULL, - (etree_type *) NULL, -- load_base); -+ load_base, 0); - - lang_add_section (&os->children, s, os, file); - ---- ld/scripttempl/elf.sc.jj Mon May 5 17:46:50 2003 -+++ ld/scripttempl/elf.sc Mon May 19 06:31:40 2003 -@@ -280,6 +280,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. */ -@@ -312,8 +314,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}} ---- ld/ldgram.y.jj Mon May 5 17:46:49 2003 -+++ ld/ldgram.y Mon May 19 06:34:38 2003 -@@ -143,14 +143,14 @@ static int error_index; - %token ORIGIN FILL - %token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS - %token ALIGNMOD AT 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 -@@ -828,21 +828,28 @@ opt_at: - | { $$ = 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 { ldlex_popstate (); ldlex_script (); } -+ sect_constraint - '{' - { - lang_enter_output_section_statement($1, $3, - sectype, -- 0, 0, 0, $4); -+ 0, 0, 0, $4, $6); - } - statement_list_opt - '}' { ldlex_popstate (); ldlex_expression (); } - memspec_opt memspec_at_opt phdr_opt fill_opt - { - ldlex_popstate (); -- lang_leave_output_section_statement ($14, $11, $13, $12); -+ lang_leave_output_section_statement ($15, $12, $14, $13); - } - opt_comma - {} ---- ld/mri.c.jj Tue Jan 21 13:21:34 2003 -+++ ld/mri.c Mon May 19 06:31:40 2003 -@@ -237,7 +237,7 @@ mri_draw_tree () - lang_enter_output_section_statement (p->name, base, - p->ok_to_load ? 0 : noload_section, - 1, align, subalign, -- (etree_type *) NULL); -+ (etree_type *) NULL, 0); - base = 0; - tmp = (struct wildcard_list *) xmalloc (sizeof *tmp); - tmp->next = NULL; ---- ld/ldlang.h.jj Wed Mar 19 12:19:16 2003 -+++ ld/ldlang.h Mon May 19 06:31:40 2003 -@@ -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 - PARAMS ((void)); - extern void lang_process ---- ld/ldlang.c.jj Thu May 15 16:42:25 2003 -+++ ld/ldlang.c Mon May 19 06:31:40 2003 -@@ -72,6 +72,10 @@ static lang_input_statement_type *new_af - bfd_boolean)); - static lang_memory_region_type *lang_memory_default - PARAMS ((asection *)); -+static lang_output_section_statement_type * lang_output_section_find_1 -+ PARAMS ((const char *, int)); -+static lang_output_section_statement_type * -+ lang_output_section_statement_lookup_1 PARAMS ((const char *, int)); - static void lang_map_flags - PARAMS ((flagword)); - static void init_os -@@ -94,6 +98,9 @@ static lang_statement_union_type *wild_s - static void output_section_callback - PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *, - lang_input_statement_type *, PTR)); -+static void check_section_callback -+ PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *, -+ lang_input_statement_type *, PTR)); - static lang_input_statement_type *lookup_name - PARAMS ((const char *)); - static bfd_boolean load_symbols -@@ -111,6 +118,9 @@ static void lang_reasonable_defaults - PARAMS ((void)); - static void insert_undefined - PARAMS ((const char *)); -+static void check_input_sections -+ PARAMS ((lang_statement_union_type *, -+ lang_output_section_statement_type *)); - static void lang_place_undefineds - PARAMS ((void)); - static void map_input_to_output_sections -@@ -745,9 +755,10 @@ lang_memory_default (section) - return lang_memory_region_lookup ("*default*"); - } - --lang_output_section_statement_type * --lang_output_section_find (name) -+static lang_output_section_statement_type * -+lang_output_section_find_1 (name, constraint) - const char *const name; -+ int constraint; - { - lang_statement_union_type *u; - lang_output_section_statement_type *lookup; -@@ -757,7 +768,9 @@ lang_output_section_find (name) - 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; - } -@@ -766,12 +779,20 @@ lang_output_section_find (name) - } - - lang_output_section_statement_type * --lang_output_section_statement_lookup (name) -+lang_output_section_find (name) -+ const char *const name; -+{ -+ return lang_output_section_find_1 (name, 0); -+} -+ -+static lang_output_section_statement_type * -+lang_output_section_statement_lookup_1 (name, constraint) - 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 == (lang_output_section_statement_type *) NULL) - { - -@@ -786,6 +807,7 @@ lang_output_section_statement_lookup (na - lookup->next = (lang_statement_union_type *) NULL; - lookup->bfd_section = (asection *) NULL; - lookup->processed = FALSE; -+ lookup->constraint = constraint; - lookup->sectype = normal_section; - lookup->addr_tree = (etree_type *) NULL; - lang_list_init (&lookup->children); -@@ -805,6 +827,13 @@ lang_output_section_statement_lookup (na - return lookup; - } - -+lang_output_section_statement_type * -+lang_output_section_statement_lookup (name) -+ const char *const name; -+{ -+ return lang_output_section_statement_lookup_1 (name, 0); -+} -+ - static void - lang_map_flags (flag) - flagword flag; -@@ -1482,6 +1511,31 @@ output_section_callback (ptr, sec, secti - } - } - -+/* Check if all sections in a wild statement for a particular FILE -+ are readonly. */ -+ -+static void -+check_section_callback (ptr, sec, section, file, output) -+ lang_wild_statement_type *ptr ATTRIBUTE_UNUSED; -+ struct wildcard_list *sec ATTRIBUTE_UNUSED; -+ asection *section; -+ lang_input_statement_type *file ATTRIBUTE_UNUSED; -+ PTR 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. */ -@@ -2151,6 +2205,41 @@ lang_place_undefineds () - } - } - -+/* Check for all readonly or some readwrite sections. */ -+ -+static void -+check_input_sections (s, output_section_statement) -+ 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 -@@ -2172,6 +2261,23 @@ map_input_to_output_sections (s, target, - 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); -@@ -2242,6 +2348,8 @@ strip_excluded_output_sections () - asection *s; - - os = &u->output_section_statement; -+ if (os->constraint == -1) -+ continue; - s = os->bfd_section; - if (s != NULL && (s->flags & SEC_EXCLUDE) != 0) - { -@@ -4132,7 +4240,7 @@ topower (x) - lang_output_section_statement_type * - lang_enter_output_section_statement (output_section_statement_name, - address_exp, sectype, block_value, -- align, subalign, ebase) -+ align, subalign, ebase, constraint) - const char *output_section_statement_name; - etree_type *address_exp; - enum section_type sectype; -@@ -4140,12 +4248,14 @@ lang_enter_output_section_statement (out - etree_type *align; - etree_type *subalign; - 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 -@@ -4879,6 +4989,8 @@ lang_record_phdrs () - struct lang_output_section_phdr_list *pl; - - os = &u->output_section_statement; -+ if (os->constraint == -1) -+ continue; - - pl = os->phdrs; - if (pl != NULL) -@@ -4939,7 +5051,8 @@ lang_record_phdrs () - { - 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; -@@ -5009,7 +5122,7 @@ lang_enter_overlay_section (name) - etree_type *size; - - lang_enter_output_section_statement (name, overlay_vma, normal_section, -- 0, 0, 0, 0); -+ 0, 0, 0, 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 ---- ld/ldlex.l.jj Mon May 5 17:46:49 2003 -+++ ld/ldlex.l Mon May 19 06:31:40 2003 -@@ -303,6 +303,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 --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-execstack.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-execstack.patch deleted file mode 100644 index 9b04bb119d5b..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-execstack.patch +++ /dev/null @@ -1,92 +0,0 @@ -2003-06-04 Jakub Jelinek <jakub@redhat.com> - - * as.c (show_usage): Document --execstack and --noexecstack. - (parse_args): Add --execstack and --noexecstack. - (main): Create .note.GNU-stack section if --execstack or - --noexecstack was given on comand line, set its SHF_EXECINSTR bit. - * as.h (flag_execstack, flag_noexecstack): New. - ---- gas/as.c.jj 2003-05-30 09:44:26.000000000 -0400 -+++ gas/as.c 2003-06-04 07:43:05.000000000 -0400 -@@ -268,6 +268,12 @@ Options:\n\ - emulate output (default %s)\n"), def_em); - } - #endif -+#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF) -+ fprintf (stream, _("\ -+ --execstack require executable stack for this object\n")); -+ fprintf (stream, _("\ -+ --noexecstack don't require executable stack for this object\n")); -+#endif - fprintf (stream, _("\ - -f skip whitespace and comment preprocessing\n")); - fprintf (stream, _("\ -@@ -437,7 +443,13 @@ parse_args (pargc, pargv) - {"warn", no_argument, NULL, OPTION_WARN}, - #define OPTION_TARGET_HELP (OPTION_STD_BASE + 19) - {"target-help", no_argument, NULL, OPTION_TARGET_HELP}, --#define OPTION_WARN_FATAL (OPTION_STD_BASE + 20) -+#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF) -+#define OPTION_EXECSTACK (OPTION_STD_BASE + 20) -+ {"execstack", no_argument, NULL, OPTION_EXECSTACK}, -+#define OPTION_NOEXECSTACK (OPTION_STD_BASE + 21) -+ {"noexecstack", no_argument, NULL, OPTION_NOEXECSTACK}, -+#endif -+#define OPTION_WARN_FATAL (OPTION_STD_BASE + 22) - {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL} - /* When you add options here, check that they do not collide with - OPTION_MD_BASE. See as.h. */ -@@ -698,6 +710,18 @@ the GNU General Public License. This pr - flag_fatal_warnings = 1; - break; - -+#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF) -+ case OPTION_EXECSTACK: -+ flag_execstack = 1; -+ flag_noexecstack = 0; -+ break; -+ -+ case OPTION_NOEXECSTACK: -+ flag_noexecstack = 1; -+ flag_execstack = 0; -+ break; -+#endif -+ - case 'Z': - flag_always_generate_output = 1; - break; -@@ -907,6 +931,19 @@ main (argc, argv) - md_end (); - #endif - -+#if defined BFD_ASSEMBLER && (defined OBJ_ELF || defined OBJ_MAYBE_ELF) -+ if ((flag_execstack || flag_noexecstack) -+ && OUTPUT_FLAVOR == bfd_target_elf_flavour) -+ { -+ segT gnustack; -+ -+ gnustack = subseg_new (".note.GNU-stack", 0); -+ bfd_set_section_flags (stdoutput, gnustack, -+ SEC_READONLY | (flag_execstack ? SEC_CODE : 0)); -+ -+ } -+#endif -+ - /* If we've been collecting dwarf2 .debug_line info, either for - assembly debugging or on behalf of the compiler, emit it now. */ - dwarf2_finish (); ---- gas/as.h.jj 2003-05-23 09:24:40.000000000 -0400 -+++ gas/as.h 2003-06-04 05:17:39.000000000 -0400 -@@ -436,6 +436,12 @@ COMMON int flag_strip_local_absolute; - /* True if we should generate a traditional format object file. */ - COMMON int flag_traditional_format; - -+/* TRUE if .note.GNU-stack section with SEC_CODE should be created */ -+COMMON int flag_execstack; -+ -+/* TRUE if .note.GNU-stack section with SEC_CODE should be created */ -+COMMON int flag_noexecstack; -+ - /* name of emitted object file */ - COMMON char *out_file_name; - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-pred.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-pred.patch deleted file mode 100644 index 52097d66210a..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-gas-pred.patch +++ /dev/null @@ -1,46 +0,0 @@ -2003-06-06 H.J. Lu <hongjiu.lu@intel.com> - - * app.c (do_scrub_chars): Add states 14 and 15 to handle - predicate for ia64. - ---- gas/app.c.pred 2003-04-24 14:19:07.000000000 -0700 -+++ gas/app.c 2003-06-07 07:48:33.000000000 -0700 -@@ -374,6 +374,12 @@ do_scrub_chars (get, tostart, tolen) - 13: After seeing a vertical bar, looking for a second - vertical bar as a parallel expression separator. - #endif -+#ifdef TC_IA64 -+ 14: After seeing a `(' at state 0, looking for a `)' as -+ predicate. -+ 15: After seeing a `(' at state 1, looking for a `)' as -+ predicate. -+#endif - */ - - /* I added states 9 and 10 because the MIPS ECOFF assembler uses -@@ -674,6 +680,25 @@ do_scrub_chars (get, tostart, tolen) - /* flushchar: */ - ch = GET (); - -+#ifdef TC_IA64 -+ if (ch == '(' && (state == 0 || state == 1)) -+ { -+ state += 14; -+ PUT (ch); -+ continue; -+ } -+ else if (state == 14 || state == 15) -+ { -+ if (ch == ')') -+ state -= 14; -+ else -+ { -+ PUT (ch); -+ continue; -+ } -+ } -+#endif -+ - recycle: - - #if defined TC_ARM && defined OBJ_ELF diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch deleted file mode 100644 index 26dfb8492c3c..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- ltconfig.jj 2003-02-03 16:56:49.000000000 +0900 -+++ ltconfig 2003-02-03 16:56:49.000000000 +0900 -@@ -1237,6 +1237,23 @@ - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' -+ -+ # Find out which ABI we are using (multilib hack). -+ case "$host_cpu" in -+ x86_64*|s390*|sparc*|ppc*|powerpc*) -+ echo "$progname:@lineno@: checking multilib ABI type" 1>&5 -+ touch conftest.$ac_ext -+ if { (eval echo $progname: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then -+ case `/usr/bin/file conftest.o` in -+ *64-bit*) -+ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64" -+ sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64" -+ ;; -+ esac -+ fi -+ rm -rf conftest* -+ ;; -+ esac - ;; - - netbsd*) diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie2.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie2.patch deleted file mode 100644 index d523059d5514..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie2.patch +++ /dev/null @@ -1,25 +0,0 @@ -2003-06-06 Jakub Jelinek <jakub@redhat.com> - - * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return - true even if -pie. - ---- bfd/elf-bfd.h.jj 2003-06-03 18:25:09.000000000 -0400 -+++ bfd/elf-bfd.h 2003-06-06 11:30:25.000000000 -0400 -@@ -217,7 +217,7 @@ struct elf_link_hash_entry - it's necessary for shared libs to also reference the .plt even - though the symbol is really local to the shared lib. */ - #define SYMBOL_REFERENCES_LOCAL(INFO, H) \ -- ((! (INFO)->shared \ -+ (((INFO)->executable \ - || (INFO)->symbolic \ - || (H)->dynindx == -1 \ - || ELF_ST_VISIBILITY ((H)->other) == STV_INTERNAL \ -@@ -227,7 +227,7 @@ struct elf_link_hash_entry - - /* Will _calls_ to this symbol always call the version in this object? */ - #define SYMBOL_CALLS_LOCAL(INFO, H) \ -- ((! (INFO)->shared \ -+ (((INFO)->executable \ - || (INFO)->symbolic \ - || (H)->dynindx == -1 \ - || ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT \ diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pni.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pni.patch deleted file mode 100644 index 13e675161613..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pni.patch +++ /dev/null @@ -1,442 +0,0 @@ -gas/ - -2003-05-05 H.J. Lu <hongjiu.lu@intel.com> - - * gas/config/tc-i386.c (md_assemble): Support Intel Precott New - Instructions. - - * gas/config/tc-i386.h (CpuPNI): New. - (CpuUnknownFlags): Add CpuPNI. - -gas/testsuite/ - -2003-05-05 H.J. Lu <hongjiu.lu@intel.com> - - * gas/i386/i386.exp: Add prescott. - - * gas/i386/prescott.d: New file. - * gas/i386/prescott.s: Likewise. - -include/opcode/ - -2003-05-05 H.J. Lu <hongjiu.lu@intel.com> - - * i386.h (i386_optab): Support Intel Precott New Instructions. - -opcodes/ - -2003-05-05 H.J. Lu <hongjiu.lu@intel.com> - - * i386-dis.c (PNI_Fixup): New. Fix up "mwait" and "monitor" in - Intel Precott New Instructions. - (PREGRP27): New. Added for "addsubpd" and "addsubps". - (PREGRP28): New. Added for "haddpd" and "haddps". - (PREGRP29): New. Added for "hsubpd" and "hsubps". - (PREGRP30): New. Added for "movsldup" and "movddup". - (PREGRP31): New. Added for "movshdup" and "movhpd". - (PREGRP32): New. Added for "lddqu". - (dis386_twobyte): Use PREGRP30 to replace the "movlpX" entry. - Use PREGRP31 to replace the "movhpX" entry. Use PREGRP28 for - entry 0x7c. Use PREGRP29 for entry 0x7d. Use PREGRP27 for - entry 0xd0. Use PREGRP32 for entry 0xf0. - (twobyte_has_modrm): Updated. - (twobyte_uses_SSE_prefix): Likewise. - (grps): Use PNI_Fixup in the "sidtQ" entry. - (prefix_user_table): Add PREGRP27, PREGRP28, PREGRP29, PREGRP30, - PREGRP31 and PREGRP32. - (float_mem): Use "fisttp{l||l|}" in entry 1 in opcode 0xdb. - Use "fisttpll" in entry 1 in opcode 0xdd. - Use "fisttp" in entry 1 in opcode 0xdf. - ---- gas/config/tc-i386.c.pni 2003-02-27 11:27:09.000000000 -0800 -+++ gas/config/tc-i386.c 2003-05-05 08:27:55.000000000 -0700 -@@ -1392,6 +1392,21 @@ md_assemble (line) - - if (i.tm.opcode_modifier & ImmExt) - { -+ if ((i.tm.cpu_flags & CpuPNI) && i.operands > 0) -+ { -+ /* These Intel Precott New Instructions have the fixed -+ operands with an opcode suffix which is coded in the same -+ place as an 8-bit immediate field would be. Here we check -+ those operands and remove them afterwards. */ -+ unsigned int x; -+ -+ for (x = 0; x < i.operands; x++) -+ if (i.op[x].regs->reg_num != x) -+ as_bad (_("can't use register '%%%s' as operand %d in '%s'."), -+ i.op[x].regs->reg_name, x + 1, i.tm.name); -+ i.operands = 0; -+ } -+ - /* These AMD 3DNow! and Intel Katmai New Instructions have an - opcode suffix which is coded in the same place as an 8-bit - immediate field would be. Here we fake an 8-bit immediate ---- gas/config/tc-i386.h.pni 2003-01-23 09:20:47.000000000 -0800 -+++ gas/config/tc-i386.h 2003-05-05 08:27:55.000000000 -0700 -@@ -243,13 +243,14 @@ typedef struct - #define CpuSSE 0x1000 /* Streaming SIMD extensions required */ - #define CpuSSE2 0x2000 /* Streaming SIMD extensions 2 required */ - #define Cpu3dnow 0x4000 /* 3dnow! support required */ -+#define CpuPNI 0x8000 /* Prescott New Instuctions required */ - - /* These flags are set by gas depending on the flag_code. */ - #define Cpu64 0x4000000 /* 64bit support required */ - #define CpuNo64 0x8000000 /* Not supported in the 64bit mode */ - - /* The default value for unknown CPUs - enable all features to avoid problems. */ --#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuSledgehammer|CpuMMX|CpuSSE|CpuSSE2|Cpu3dnow|CpuK6|CpuAthlon) -+#define CpuUnknownFlags (Cpu086|Cpu186|Cpu286|Cpu386|Cpu486|Cpu586|Cpu686|CpuP4|CpuSledgehammer|CpuMMX|CpuSSE|CpuSSE2|CpuPNI|Cpu3dnow|CpuK6|CpuAthlon) - - /* the bits in opcode_modifier are used to generate the final opcode from - the base_opcode. These bits also are used to detect alternate forms of ---- gas/testsuite/gas/i386/i386.exp.pni 2002-11-06 09:20:11.000000000 -0800 -+++ gas/testsuite/gas/i386/i386.exp 2003-05-05 08:54:06.000000000 -0700 -@@ -56,6 +56,7 @@ if [expr ([istarget "i*86-*-*"] || [ist - run_dump_test "absrel" - run_dump_test "pcrel" - run_dump_test "sub" -+ run_dump_test "prescott" - - # PIC is only supported on ELF targets. - if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"] ) ---- gas/testsuite/gas/i386/prescott.d.pni 2003-05-05 08:53:28.000000000 -0700 -+++ gas/testsuite/gas/i386/prescott.d 2003-05-05 09:23:20.000000000 -0700 -@@ -0,0 +1,37 @@ -+#objdump: -dw -+#name: i386 prescott -+ -+.*: +file format .* -+ -+Disassembly of section .text: -+ -+0+000 <foo>: -+ 0: 66 0f d0 01 [ ]*addsubpd \(%ecx\),%xmm0 -+ 4: 66 0f d0 ca [ ]*addsubpd %xmm2,%xmm1 -+ 8: f2 0f d0 13 [ ]*addsubps \(%ebx\),%xmm2 -+ c: f2 0f d0 dc [ ]*addsubps %xmm4,%xmm3 -+ 10: df 88 90 90 90 90 [ ]*fisttp 0x90909090\(%eax\) -+ 16: db 88 90 90 90 90 [ ]*fisttpl 0x90909090\(%eax\) -+ 1c: dd 88 90 90 90 90 [ ]*fisttpll 0x90909090\(%eax\) -+ 22: dd 88 90 90 90 90 [ ]*fisttpll 0x90909090\(%eax\) -+ 28: dd 88 90 90 90 90 [ ]*fisttpll 0x90909090\(%eax\) -+ 2e: 66 0f 7c 65 00 [ ]*haddpd 0x0\(%ebp\),%xmm4 -+ 33: 66 0f 7c ee [ ]*haddpd %xmm6,%xmm5 -+ 37: f2 0f 7c 37 [ ]*haddps \(%edi\),%xmm6 -+ 3b: f2 0f 7c f8 [ ]*haddps %xmm0,%xmm7 -+ 3f: 66 0f 7d c1 [ ]*hsubpd %xmm1,%xmm0 -+ 43: 66 0f 7d 0a [ ]*hsubpd \(%edx\),%xmm1 -+ 47: f2 0f 7d d2 [ ]*hsubps %xmm2,%xmm2 -+ 4b: f2 0f 7d 1c 24 [ ]*hsubps \(%esp,1\),%xmm3 -+ 50: f2 0f f0 2e [ ]*lddqu \(%esi\),%xmm5 -+ 54: 0f 01 c8 [ ]*monitor %eax,%ecx,%edx -+ 57: 0f 01 c8 [ ]*monitor %eax,%ecx,%edx -+ 5a: f2 0f 12 f7 [ ]*movddup %xmm7,%xmm6 -+ 5e: f2 0f 12 38 [ ]*movddup \(%eax\),%xmm7 -+ 62: f3 0f 16 01 [ ]*movshdup \(%ecx\),%xmm0 -+ 66: f3 0f 16 ca [ ]*movshdup %xmm2,%xmm1 -+ 6a: f3 0f 12 13 [ ]*movsldup \(%ebx\),%xmm2 -+ 6e: f3 0f 12 dc [ ]*movsldup %xmm4,%xmm3 -+ 72: 0f 01 c9 [ ]*mwait %eax,%ecx -+ 75: 0f 01 c9 [ ]*mwait %eax,%ecx -+ ... ---- gas/testsuite/gas/i386/prescott.s.pni 2003-05-05 08:53:31.000000000 -0700 -+++ gas/testsuite/gas/i386/prescott.s 2003-05-05 08:46:29.000000000 -0700 -@@ -0,0 +1,34 @@ -+#Prescott New Instructions -+ -+ .text -+foo: -+ addsubpd (%ecx),%xmm0 -+ addsubpd %xmm2,%xmm1 -+ addsubps (%ebx),%xmm2 -+ addsubps %xmm4,%xmm3 -+ fisttp 0x90909090(%eax) -+ fisttpl 0x90909090(%eax) -+ fisttpd 0x90909090(%eax) -+ fisttpq 0x90909090(%eax) -+ fisttpll 0x90909090(%eax) -+ haddpd 0x0(%ebp),%xmm4 -+ haddpd %xmm6,%xmm5 -+ haddps (%edi),%xmm6 -+ haddps %xmm0,%xmm7 -+ hsubpd %xmm1,%xmm0 -+ hsubpd (%edx),%xmm1 -+ hsubps %xmm2,%xmm2 -+ hsubps (%esp,1),%xmm3 -+ lddqu (%esi),%xmm5 -+ monitor -+ monitor %eax,%ecx,%edx -+ movddup %xmm7,%xmm6 -+ movddup (%eax),%xmm7 -+ movshdup (%ecx),%xmm0 -+ movshdup %xmm2,%xmm1 -+ movsldup (%ebx),%xmm2 -+ movsldup %xmm4,%xmm3 -+ mwait -+ mwait %eax,%ecx -+ -+ .p2align 4,0 ---- include/opcode/i386.h.pni 2002-07-08 08:39:20.000000000 -0700 -+++ include/opcode/i386.h 2003-05-05 08:27:55.000000000 -0700 -@@ -1302,6 +1302,30 @@ static const template i386_optab[] = { - {"punpckhqdq",2, 0x660f6d, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, - {"punpcklqdq",2, 0x660f6c, X, CpuSSE2, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, - -+/* Prescott New Instructions. */ -+ -+{"addsubpd", 2, 0x660fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"addsubps", 2, 0xf20fd0, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"fisttp", 1, 0xdf, 1, CpuPNI, sl_FP|FloatMF|Modrm, { ShortMem|LongMem, 0, 0} }, -+/* Intel Syntax */ -+{"fisttpd", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} }, -+{"fisttpq", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} }, -+{"fisttpll", 1, 0xdd, 1, CpuPNI, FP|Modrm, { LLongMem, 0, 0} }, -+{"haddpd", 2, 0x660f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"haddps", 2, 0xf20f7c, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"hsubpd", 2, 0x660f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"hsubps", 2, 0xf20f7d, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"lddqu", 2, 0xf20ff0, X, CpuPNI, FP|Modrm, { LLongMem, RegXMM, 0 } }, -+{"monitor", 0, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { 0, 0, 0} }, -+/* Need to ensure only "monitor %eax,%ecx,%edx" is accepted. */ -+{"monitor", 3, 0x0f01, 0xc8, CpuPNI, FP|ImmExt, { Reg32, Reg32, Reg32} }, -+{"movddup", 2, 0xf20f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"movshdup", 2, 0xf30f16, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"movsldup", 2, 0xf30f12, X, CpuPNI, FP|Modrm, { RegXMM|LLongMem, RegXMM, 0 } }, -+{"mwait", 0, 0x0f01, 0xc9, CpuPNI, FP|ImmExt, { 0, 0, 0} }, -+/* Need to ensure only "mwait %eax,%ecx" is accepted. */ -+{"mwait", 2, 0x0f01, 0xc9, CpuPNI, FP|ImmExt, { Reg32, Reg32, 0} }, -+ - /* AMD 3DNow! instructions. */ - - {"prefetch", 1, 0x0f0d, 0, Cpu3dnow, FP|Modrm, { ByteMem, 0, 0 } }, ---- opcodes/i386-dis.c.pni 2003-03-24 09:53:02.000000000 -0800 -+++ opcodes/i386-dis.c 2003-05-05 08:27:55.000000000 -0700 -@@ -93,6 +93,7 @@ static void OP_XS PARAMS ((int, int)); - static void OP_3DNowSuffix PARAMS ((int, int)); - static void OP_SIMD_Suffix PARAMS ((int, int)); - static void SIMD_Fixup PARAMS ((int, int)); -+static void PNI_Fixup PARAMS ((int, int)); - static void BadOp PARAMS ((void)); - - struct dis_private { -@@ -417,6 +418,12 @@ fetch_data (info, addr) - #define PREGRP24 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 24, NULL, 0 - #define PREGRP25 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 25, NULL, 0 - #define PREGRP26 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 26, NULL, 0 -+#define PREGRP27 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 27, NULL, 0 -+#define PREGRP28 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 28, NULL, 0 -+#define PREGRP29 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 29, NULL, 0 -+#define PREGRP30 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 30, NULL, 0 -+#define PREGRP31 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 31, NULL, 0 -+#define PREGRP32 NULL, NULL, USE_PREFIX_USER_TABLE, NULL, 32, NULL, 0 - - #define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0 - -@@ -776,11 +783,11 @@ static const struct dis386 dis386_twobyt - /* 10 */ - { PREGRP8 }, - { PREGRP9 }, -- { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */ -+ { PREGRP30 }, - { "movlpX", EX, XM, SIMD_Fixup, 'h' }, - { "unpcklpX", XM, EX, XX }, - { "unpckhpX", XM, EX, XX }, -- { "movhpX", XM, EX, SIMD_Fixup, 'l' }, -+ { PREGRP31 }, - { "movhpX", EX, XM, SIMD_Fixup, 'l' }, - /* 18 */ - { GRP14 }, -@@ -895,8 +902,8 @@ static const struct dis386 dis386_twobyt - { "(bad)", XX, XX, XX }, - { "(bad)", XX, XX, XX }, - { "(bad)", XX, XX, XX }, -- { "(bad)", XX, XX, XX }, -- { "(bad)", XX, XX, XX }, -+ { PREGRP28 }, -+ { PREGRP29 }, - { PREGRP23 }, - { PREGRP20 }, - /* 80 */ -@@ -990,7 +997,7 @@ static const struct dis386 dis386_twobyt - { "bswap", RMeSI, XX, XX }, - { "bswap", RMeDI, XX, XX }, - /* d0 */ -- { "(bad)", XX, XX, XX }, -+ { PREGRP27 }, - { "psrlw", MX, EM, XX }, - { "psrld", MX, EM, XX }, - { "psrlq", MX, EM, XX }, -@@ -1026,7 +1033,7 @@ static const struct dis386 dis386_twobyt - { "pmaxsw", MX, EM, XX }, - { "pxor", MX, EM, XX }, - /* f0 */ -- { "(bad)", XX, XX, XX }, -+ { PREGRP32 }, - { "psllw", MX, EM, XX }, - { "pslld", MX, EM, XX }, - { "psllq", MX, EM, XX }, -@@ -1078,15 +1085,15 @@ static const unsigned char twobyte_has_m - /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */ - /* 50 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 5f */ - /* 60 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 6f */ -- /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1, /* 7f */ -+ /* 70 */ 1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1, /* 7f */ - /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */ - /* 90 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 9f */ - /* a0 */ 0,0,0,1,1,1,0,0,0,0,0,1,1,1,1,1, /* af */ - /* b0 */ 1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1, /* bf */ - /* c0 */ 1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0, /* cf */ -- /* d0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */ -+ /* d0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* df */ - /* e0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* ef */ -- /* f0 */ 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */ -+ /* f0 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0 /* ff */ - /* ------------------------------- */ - /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - }; -@@ -1095,21 +1102,21 @@ static const unsigned char twobyte_uses_ - /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - /* ------------------------------- */ - /* 00 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 0f */ -- /* 10 */ 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 1f */ -+ /* 10 */ 1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0, /* 1f */ - /* 20 */ 0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0, /* 2f */ - /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */ - /* 40 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 4f */ - /* 50 */ 0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1, /* 5f */ - /* 60 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1, /* 6f */ -- /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1, /* 7f */ -+ /* 70 */ 1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1, /* 7f */ - /* 80 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 8f */ - /* 90 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 9f */ - /* a0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* af */ - /* b0 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* bf */ - /* c0 */ 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0, /* cf */ -- /* d0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */ -+ /* d0 */ 1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* df */ - /* e0 */ 0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0, /* ef */ -- /* f0 */ 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */ -+ /* f0 */ 1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 /* ff */ - /* ------------------------------- */ - /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ - }; -@@ -1349,7 +1356,7 @@ static const struct dis386 grps[][8] = { - /* GRP7 */ - { - { "sgdtQ", M, XX, XX }, -- { "sidtQ", M, XX, XX }, -+ { "sidtQ", PNI_Fixup, 0, XX, XX }, - { "lgdtQ", M, XX, XX }, - { "lidtQ", M, XX, XX }, - { "smswQ", Ev, XX, XX }, -@@ -1638,6 +1645,48 @@ static const struct dis386 prefix_user_t - { "punpcklqdq", XM, EX, XX }, - { "(bad)", XM, EX, XX }, - }, -+ /* PREGRP27 */ -+ { -+ { "(bad)", MX, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ { "addsubpd", XM, EX, XX }, -+ { "addsubps", XM, EX, XX }, -+ }, -+ /* PREGRP28 */ -+ { -+ { "(bad)", MX, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ { "haddpd", XM, EX, XX }, -+ { "haddps", XM, EX, XX }, -+ }, -+ /* PREGRP29 */ -+ { -+ { "(bad)", MX, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ { "hsubpd", XM, EX, XX }, -+ { "hsubps", XM, EX, XX }, -+ }, -+ /* PREGRP30 */ -+ { -+ { "movlpX", XM, EX, SIMD_Fixup, 'h' }, /* really only 2 operands */ -+ { "movsldup", XM, EX, XX }, -+ { "movlpd", XM, EX, XX }, -+ { "movddup", XM, EX, XX }, -+ }, -+ /* PREGRP31 */ -+ { -+ { "movhpX", XM, EX, SIMD_Fixup, 'l' }, -+ { "movshdup", XM, EX, XX }, -+ { "movhpd", XM, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ }, -+ /* PREGRP32 */ -+ { -+ { "(bad)", XM, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ { "(bad)", XM, EX, XX }, -+ { "lddqu", XM, M, XX }, -+ }, - }; - - static const struct dis386 x86_64_table[][2] = { -@@ -2294,7 +2343,7 @@ static const char *float_mem[] = { - "fidivr{l||l|}", - /* db */ - "fild{l||l|}", -- "(bad)", -+ "fisttp{l||l|}", - "fist{l||l|}", - "fistp{l||l|}", - "(bad)", -@@ -2312,7 +2361,7 @@ static const char *float_mem[] = { - "fdivr{l||l|}", - /* dd */ - "fld{l||l|}", -- "(bad)", -+ "fisttpll", - "fst{l||l|}", - "fstp{l||l|}", - "frstor", -@@ -2330,7 +2379,7 @@ static const char *float_mem[] = { - "fidivr", - /* df */ - "fild", -- "(bad)", -+ "fisttp", - "fist", - "fistp", - "fbld", -@@ -4138,6 +4187,33 @@ SIMD_Fixup (extrachar, sizeflag) - } - - static void -+PNI_Fixup (extrachar, sizeflag) -+ int extrachar ATTRIBUTE_UNUSED; -+ int sizeflag ATTRIBUTE_UNUSED; -+{ -+ if (mod == 3 && reg == 1) -+ { -+ char *p = obuf + strlen (obuf); -+ -+ /* Override "sidt". */ -+ if (rm) -+ { -+ /* mwait %eax,%ecx */ -+ strcpy (p - 4, "mwait %eax,%ecx"); -+ } -+ else -+ { -+ /* monitor %eax,%ecx,%edx" */ -+ strcpy (p - 4, "monitor %eax,%ecx,%edx"); -+ } -+ -+ codep++; -+ } -+ else -+ OP_E (0, sizeflag); -+} -+ -+static void - BadOp (void) - { - /* Throw away prefixes and 1st. opcode byte. */ diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch deleted file mode 100644 index 2689ef78c390..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch +++ /dev/null @@ -1,16 +0,0 @@ -2003-05-31 Jakub Jelinek <jakub@redhat.com> - - * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192 - plt entries, not just 8191. - ---- bfd/elf32-ppc.c.jj 2003-05-30 11:19:17.000000000 -0400 -+++ bfd/elf32-ppc.c 2003-05-30 18:22:31.000000000 -0400 -@@ -2719,7 +2719,7 @@ allocate_dynrelocs (h, inf) - for two entries is allocated. */ - s->_raw_size += PLT_ENTRY_SIZE; - if ((s->_raw_size - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE -- >= PLT_NUM_SINGLE_ENTRIES) -+ > PLT_NUM_SINGLE_ENTRIES) - s->_raw_size += PLT_ENTRY_SIZE; - - /* We also need to make an entry in the .rela.plt section. */ diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-ctors.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-ctors.patch deleted file mode 100644 index 339fb690b5f0..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-ctors.patch +++ /dev/null @@ -1,20 +0,0 @@ -2003-06-10 Alan Modra <amodra@bigpond.net.au> - - * emulparams/elf64ppc.sh (EXECUTABLE_SYMBOLS, OTHER_BSS_END_SYMBOLS, - CTOR_START, CTOR_END, DTOR_START, DTOR_END): Don't define. - ---- ld/emulparams/elf64ppc.sh 30 May 2003 15:50:11 -0000 -+++ ld/emulparams/elf64ppc.sh 10 Jun 2003 04:27:28 -0000 -@@ -12,12 +12,6 @@ COMMONPAGESIZE=0x1000 - ARCH=powerpc:common64 - MACHINE= - NOP=0x60000000 --EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);' --OTHER_BSS_END_SYMBOLS='__end = .;' --CTOR_START='PROVIDE (__CTOR_LIST__ = .); PROVIDE (___CTOR_LIST__ = .);' --CTOR_END='PROVIDE (__CTOR_END__ = .); PROVIDE (___CTOR_END__ = .);' --DTOR_START='PROVIDE (__DTOR_LIST__ = .); PROVIDE (___DTOR_LIST__ = .);' --DTOR_END='PROVIDE (__DTOR_END__ = .); PROVIDE (___DTOR_END__ = .);' - OTHER_TEXT_SECTIONS="*(.sfpr .glink)" - BSS_PLT= - OTHER_BSS_SYMBOLS=" diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch deleted file mode 100644 index db21d8899ae4..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-ppc64-prelink.patch +++ /dev/null @@ -1,132 +0,0 @@ -2003-06-17 Alan Modra <amodra@bigpond.net.au> - - * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero. - -2003-06-16 Alan Modra <amodra@bigpond.net.au> - - * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel - tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a - dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write - got section for RELATIVE relocs. Fix wrong comment. Change condition - under which dynamic relocs update the section contents. - ---- bfd/elf64-ppc.c 10 Jun 2003 07:44:09 -0000 1.101 -+++ bfd/elf64-ppc.c 16 Jun 2003 10:50:22 -0000 1.102 -@@ -7153,7 +7153,11 @@ ppc64_elf_relocate_section (output_bfd, - tls_mask = *toc_tls; - if (r_type == R_PPC64_TOC16_DS - || r_type == R_PPC64_TOC16_LO_DS) -- goto toctprel; -+ { -+ if (tls_mask != 0 -+ && (tls_mask & (TLS_DTPREL | TLS_TPREL)) == 0) -+ goto toctprel; -+ } - else - { - /* If we found a GD reloc pair, then we might be -@@ -7176,11 +7180,11 @@ ppc64_elf_relocate_section (output_bfd, - - case R_PPC64_GOT_TPREL16_DS: - case R_PPC64_GOT_TPREL16_LO_DS: -- toctprel: - if (tls_mask != 0 - && (tls_mask & TLS_TPREL) == 0) - { - bfd_vma insn; -+ toctprel: - insn = bfd_get_32 (output_bfd, contents + rel->r_offset - 2); - insn &= 31 << 21; - insn |= 0x3c0d0000; /* addis 0,13,0 */ -@@ -7653,6 +7657,7 @@ ppc64_elf_relocate_section (output_bfd, - outrel.r_offset = (htab->sgot->output_section->vma - + htab->sgot->output_offset - + off); -+ outrel.r_addend = rel->r_addend; - if (tls_type & (TLS_LD | TLS_GD)) - { - outrel.r_addend = 0; -@@ -7665,6 +7670,7 @@ ppc64_elf_relocate_section (output_bfd, - bfd_elf64_swap_reloca_out (output_bfd, - &outrel, loc); - outrel.r_offset += 8; -+ outrel.r_addend = rel->r_addend; - outrel.r_info - = ELF64_R_INFO (indx, R_PPC64_DTPREL64); - } -@@ -7674,11 +7680,18 @@ ppc64_elf_relocate_section (output_bfd, - else if (tls_type == (TLS_TLS | TLS_TPREL)) - outrel.r_info = ELF64_R_INFO (indx, R_PPC64_TPREL64); - else if (indx == 0) -- outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE); -+ { -+ outrel.r_info = ELF64_R_INFO (indx, R_PPC64_RELATIVE); -+ -+ /* Write the .got section contents for the sake -+ of prelink. */ -+ loc = htab->sgot->contents + off; -+ bfd_put_64 (output_bfd, outrel.r_addend + relocation, loc); -+ } - else - outrel.r_info = ELF64_R_INFO (indx, R_PPC64_GLOB_DAT); -- outrel.r_addend = rel->r_addend; -- if (indx == 0) -+ -+ if (indx == 0 && tls_type != (TLS_TLS | TLS_LD)) - { - outrel.r_addend += relocation; - if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL)) -@@ -7921,8 +7934,6 @@ ppc64_elf_relocate_section (output_bfd, - or this is an opd section reloc which must point - at a local function. */ - outrel.r_addend += relocation; -- /* ??? why? */ -- relocate = TRUE; - if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC) - { - if (is_opd && h != NULL) -@@ -7940,6 +7951,12 @@ ppc64_elf_relocate_section (output_bfd, - unresolved_reloc = FALSE; - } - outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE); -+ -+ /* We need to relocate .opd contents for ld.so. -+ Prelink also wants simple and consistent rules -+ for relocs. This make all RELATIVE relocs have -+ *r_offset equal to r_addend. */ -+ relocate = TRUE; - } - else - { -@@ -7981,9 +7998,29 @@ ppc64_elf_relocate_section (output_bfd, - - /* If this reloc is against an external symbol, it will - be computed at runtime, so there's no need to do -- anything now. */ -+ anything now. However, for the sake of prelink ensure -+ that the section contents are a known value. */ - if (! relocate) -- continue; -+ { -+ unresolved_reloc = FALSE; -+ /* The value chosen here is quite arbitrary as ld.so -+ ignores section contents except for the special -+ case of .opd where the contents might be accessed -+ before relocation. Choose zero, as that won't -+ cause reloc overflow. */ -+ relocation = 0; -+ addend = 0; -+ /* Use *r_offset == r_addend for R_PPC64_ADDR64 relocs -+ to improve backward compatibility with older -+ versions of ld. */ -+ if (r_type == R_PPC64_ADDR64) -+ addend = outrel.r_addend; -+ /* Adjust pc_relative relocs to have zero in *r_offset. */ -+ else if (ppc64_elf_howto_table[(int) r_type]->pc_relative) -+ addend = (input_section->output_section->vma -+ + input_section->output_offset -+ + rel->r_offset); -+ } - } - break; - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pt-gnu-stack.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pt-gnu-stack.patch deleted file mode 100644 index d6cfd392dc44..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pt-gnu-stack.patch +++ /dev/null @@ -1,235 +0,0 @@ -2003-06-03 Jakub Jelinek <jakub@redhat.com> - -binutils/ - * readelf.c (get_segment_type): Handle PT_GNU_STACK. -bfd/ - * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK. - (bfd_section_from_phdr): Likewise. - (map_sections_to_segments): Create PT_GNU_STACK segment header. - (get_program_header_size): Count with PT_GNU_STACK. - * elf-bfd.h (struct elf_obj_tdata): Add stack_flags. - * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags. -include/ - * bfdlink.h (struct bfd_link_info): Add execstack and noexecstack. - * elf/common.h (PT_GNU_STACK): Define. -ld/ - * ldgram.y (phdr_type): Grok PT_GNU_STACK. - * emultempl/elf32.em (gld${EMULATION_NAME}_handle_option): Add - -z execstack and -z noexecstack. - (gld${EMULATION_NAME}_list_options): Likewise. - * scripttempl/elf.sc: If not -r, discard .note.GNU-stack section. - ---- binutils/readelf.c.jj 2003-05-23 09:24:40.000000000 -0400 -+++ binutils/readelf.c 2003-05-23 10:50:05.000000000 -0400 -@@ -2307,6 +2307,7 @@ get_segment_type (p_type) - - case PT_GNU_EH_FRAME: - return "GNU_EH_FRAME"; -+ case PT_GNU_STACK: return "STACK"; - - default: - if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC)) ---- bfd/elf.c.jj 2003-05-23 09:24:39.000000000 -0400 -+++ bfd/elf.c 2003-05-23 16:15:02.000000000 -0400 -@@ -1070,6 +1070,7 @@ _bfd_elf_print_private_bfd_data (abfd, f - case PT_PHDR: pt = "PHDR"; break; - case PT_TLS: pt = "TLS"; break; - case PT_GNU_EH_FRAME: pt = "EH_FRAME"; break; -+ case PT_GNU_STACK: pt = "STACK"; break; - default: sprintf (buf, "0x%lx", p->p_type); pt = buf; break; - } - fprintf (f, "%8s off 0x", pt); -@@ -2296,6 +2297,9 @@ bfd_section_from_phdr (abfd, hdr, index) - return _bfd_elf_make_section_from_phdr (abfd, hdr, index, - "eh_frame_hdr"); - -+ case PT_GNU_STACK: -+ return _bfd_elf_make_section_from_phdr (abfd, hdr, index, "stack"); -+ - default: - /* Check for any processor-specific program segment types. - If no handler for them, default to making "segment" sections. */ -@@ -3513,6 +3517,21 @@ map_sections_to_segments (abfd) - pm = &m->next; - } - -+ if (elf_tdata (abfd)->stack_flags) -+ { -+ amt = sizeof (struct elf_segment_map); -+ m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); -+ if (m == NULL) -+ goto error_return; -+ m->next = NULL; -+ m->p_type = PT_GNU_STACK; -+ m->p_flags = elf_tdata (abfd)->stack_flags; -+ m->p_flags_valid = 1; -+ -+ *pm = m; -+ pm = &m->next; -+ } -+ - free (sections); - sections = NULL; - -@@ -4099,6 +4118,12 @@ get_program_header_size (abfd) - ++segs; - } - -+ if (elf_tdata (abfd)->stack_flags) -+ { -+ /* We need a PT_GNU_STACK segment. */ -+ ++segs; -+ } -+ - for (s = abfd->sections; s != NULL; s = s->next) - { - if ((s->flags & SEC_LOAD) != 0 ---- bfd/elf-bfd.h.jj 2003-05-23 09:24:39.000000000 -0400 -+++ bfd/elf-bfd.h 2003-05-23 10:30:28.000000000 -0400 -@@ -1254,6 +1254,9 @@ struct elf_obj_tdata - /* Number of symbol version references we are about to emit. */ - unsigned int cverrefs; - -+ /* Segment flags for the PT_GNU_STACK segment. */ -+ unsigned int stack_flags; -+ - /* Symbol version definitions in external objects. */ - Elf_Internal_Verdef *verdef; - ---- bfd/elflink.h.jj 2003-05-23 09:24:40.000000000 -0400 -+++ bfd/elflink.h 2003-05-23 16:35:55.000000000 -0400 -@@ -1937,6 +1937,43 @@ NAME(bfd_elf,size_dynamic_sections) (out - if (! is_elf_hash_table (info)) - return TRUE; - -+ if (info->execstack) -+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | PF_X; -+ else if (info->noexecstack) -+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W; -+ else -+ { -+ bfd *inputobj; -+ asection *notesec = NULL; -+ int exec = 0; -+ -+ for (inputobj = info->input_bfds; -+ inputobj; -+ inputobj = inputobj->link_next) -+ { -+ asection *s; -+ -+ if (inputobj->flags & DYNAMIC) -+ continue; -+ s = bfd_get_section_by_name (inputobj, ".note.GNU-stack"); -+ if (s) -+ { -+ if (s->flags & SEC_CODE) -+ exec = PF_X; -+ notesec = s; -+ } -+ else -+ exec = PF_X; -+ } -+ if (notesec) -+ { -+ elf_tdata (output_bfd)->stack_flags = PF_R | PF_W | exec; -+ if (exec && info->relocateable -+ && notesec->output_section != bfd_abs_section_ptr) -+ notesec->output_section->flags |= SEC_CODE; -+ } -+ } -+ - /* Any syms created from now on start with -1 in - got.refcount/offset and plt.refcount/offset. */ - elf_hash_table (info)->init_refcount = elf_hash_table (info)->init_offset; ---- include/bfdlink.h.jj 2003-05-23 09:24:43.000000000 -0400 -+++ include/bfdlink.h 2003-05-23 10:07:06.000000000 -0400 -@@ -291,6 +291,14 @@ struct bfd_link_info - /* TRUE if relaxation is being finalized. */ - unsigned int relax_finalizing: 1; - -+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W|PF_X -+ flags. */ -+ unsigned int execstack: 1; -+ -+ /* TRUE if PT_GNU_STACK segment should be created with PF_R|PF_W -+ flags. */ -+ unsigned int noexecstack: 1; -+ - /* Which symbols to strip. */ - enum bfd_link_strip strip; - ---- include/elf/common.h.jj 2003-05-23 09:24:43.000000000 -0400 -+++ include/elf/common.h 2003-05-23 09:32:48.000000000 -0400 -@@ -288,6 +288,7 @@ - #define PT_HIPROC 0x7FFFFFFF /* Processor-specific */ - - #define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550) -+#define PT_GNU_STACK (PT_LOOS + 0x474e551) - - /* Program segment permissions, in program header p_flags field. */ - ---- ld/ldgram.y.jj 2003-05-05 18:28:06.000000000 -0400 -+++ ld/ldgram.y 2003-05-23 16:52:09.000000000 -0400 -@@ -1006,6 +1006,8 @@ phdr_type: - { - if (strcmp (s, "PT_GNU_EH_FRAME") == 0) - $$ = exp_intop (0x6474e550); -+ else if (strcmp (s, "PT_GNU_STACK") == 0) -+ $$ = exp_intop (0x6474e551); - else - { - einfo (_("\ ---- ld/emultempl/elf32.em.jj 2003-05-19 17:12:46.000000000 -0400 -+++ ld/emultempl/elf32.em 2003-05-23 10:08:07.000000000 -0400 -@@ -1664,6 +1664,16 @@ cat >>e${EMULATION_NAME}.c <<EOF - link_info.combreloc = FALSE; - else if (strcmp (optarg, "nocopyreloc") == 0) - link_info.nocopyreloc = TRUE; -+ else if (strcmp (optarg, "execstack") == 0) -+ { -+ link_info.execstack = TRUE; -+ link_info.noexecstack = FALSE; -+ } -+ else if (strcmp (optarg, "noexecstack") == 0) -+ { -+ link_info.noexecstack = TRUE; -+ link_info.execstack = FALSE; -+ } - /* What about the other Solaris -z options? FIXME. */ - break; - EOF -@@ -1702,6 +1712,7 @@ cat >>e${EMULATION_NAME}.c <<EOF - fprintf (file, _(" --eh-frame-hdr\tCreate .eh_frame_hdr section\n")); - fprintf (file, _(" -z combreloc\t\tMerge dynamic relocs into one section and sort\n")); - fprintf (file, _(" -z defs\t\tDisallows undefined symbols\n")); -+ fprintf (file, _(" -z execstack\t\tMark executable as requiring executable stack\n")); - fprintf (file, _(" -z initfirst\t\tMark DSO to be initialized first at runtime\n")); - fprintf (file, _(" -z interpose\t\tMark object to interpose all DSOs but executable\n")); - fprintf (file, _(" -z loadfltr\t\tMark object requiring immediate process\n")); -@@ -1712,6 +1723,7 @@ cat >>e${EMULATION_NAME}.c <<EOF - fprintf (file, _(" -z nodelete\t\tMark DSO non-deletable at runtime\n")); - fprintf (file, _(" -z nodlopen\t\tMark DSO not available to dlopen\n")); - fprintf (file, _(" -z nodump\t\tMark DSO not available to dldump\n")); -+ fprintf (file, _(" -z noexecstack\t\tMark executable as not requiring executable stack\n")); - fprintf (file, _(" -z now\t\tMark object non-lazy runtime binding\n")); - fprintf (file, _(" -z origin\t\tMark object requiring immediate \$ORIGIN processing\n\t\t\t at runtime\n")); - fprintf (file, _(" -z KEYWORD\t\tIgnored for Solaris compatibility\n")); ---- ld/scripttempl/elf.sc.jj 2003-04-14 10:57:55.000000000 -0400 -+++ ld/scripttempl/elf.sc 2003-05-23 16:23:06.000000000 -0400 -@@ -84,6 +84,7 @@ INTERP=".interp ${RELOCATING-0} : - PLT=".plt ${RELOCATING-0} : { *(.plt) }" - DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" - RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" -+STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }" - if test -z "${NO_SMALL_DATA}"; then - SBSS=".sbss ${RELOCATING-0} : - { -@@ -395,5 +396,6 @@ cat <<EOF - ${STACK_ADDR+${STACK}} - ${OTHER_SECTIONS} - ${RELOCATING+${OTHER_END_SYMBOLS}} -+ ${RELOCATING+${STACKNOTE}} - } - EOF - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-sparc-nonpic.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-sparc-nonpic.patch deleted file mode 100644 index 78b55fe1e398..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-sparc-nonpic.patch +++ /dev/null @@ -1,94 +0,0 @@ -2002-04-20 Jakub Jelinek <jakub@redhat.com> - - * elf32-sparc.c (elf32_sparc_relocate_section): Find real output - section with SEC_MERGE. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - ---- bfd/elf32-sparc.c.jj Thu Feb 6 08:07:10 2003 -+++ bfd/elf32-sparc.c Thu Feb 6 08:31:54 2003 -@@ -2168,7 +2168,7 @@ elf32_sparc_relocate_section (output_bfd - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - asection *sec; -- bfd_vma relocation, off; -+ bfd_vma relocation, off, orig_addend = 0; - bfd_reloc_status_type r; - bfd_boolean is_plt = FALSE; - bfd_boolean unresolved_reloc; -@@ -2196,6 +2196,7 @@ elf32_sparc_relocate_section (output_bfd - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -+ orig_addend = rel->r_addend; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); - } - else -@@ -2525,6 +2526,24 @@ elf32_sparc_relocate_section (output_bfd - asection *osec; - - osec = sec->output_section; -+ /* FIXME: As soon as making sections zero size -+ is possible, this if can go away. */ -+ if (bfd_is_abs_section (osec) -+ && h == NULL -+ && (sec->flags & SEC_MERGE) -+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION -+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE) -+ { -+ asection *msec; -+ -+ msec = sec; -+ _bfd_merged_section_offset (output_bfd, &msec, -+ elf_section_data (sec)->sec_info, -+ sym->st_value + orig_addend, -+ (bfd_vma) 0); -+ osec = msec->output_section; -+ } -+ - indx = elf_section_data (osec)->dynindx; - - /* FIXME: we really should be able to link non-pic ---- bfd/elf64-sparc.c.jj Thu Feb 6 08:07:10 2003 -+++ bfd/elf64-sparc.c Thu Feb 6 08:31:54 2003 -@@ -2016,7 +2016,7 @@ sparc64_elf_relocate_section (output_bfd - struct elf_link_hash_entry *h; - Elf_Internal_Sym *sym; - asection *sec; -- bfd_vma relocation, off; -+ bfd_vma relocation, off, orig_addend = 0; - bfd_reloc_status_type r; - bfd_boolean is_plt = FALSE; - bfd_boolean unresolved_reloc; -@@ -2039,6 +2039,7 @@ sparc64_elf_relocate_section (output_bfd - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -+ orig_addend = rel->r_addend; - relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); - } - else -@@ -2267,6 +2268,24 @@ sparc64_elf_relocate_section (output_bfd - asection *osec; - - osec = sec->output_section; -+ /* FIXME: As soon as making sections zero size -+ is possible, this if can go away. */ -+ if (bfd_is_abs_section (osec) -+ && h == NULL -+ && (sec->flags & SEC_MERGE) -+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION -+ && sec->sec_info_type == ELF_INFO_TYPE_MERGE) -+ { -+ asection *msec; -+ -+ msec = sec; -+ _bfd_merged_section_offset (output_bfd, &msec, -+ elf_section_data (sec)->sec_info, -+ sym->st_value + orig_addend, -+ (bfd_vma) 0); -+ osec = msec->output_section; -+ } -+ - indx = elf_section_data (osec)->dynindx; - - /* We are turning this relocation into one diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-eh-frame-ro.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-eh-frame-ro.patch deleted file mode 100644 index 42966d13982a..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-eh-frame-ro.patch +++ /dev/null @@ -1,426 +0,0 @@ -2002-11-22 Jakub Jelinek <jakub@redhat.com> - - * ldgram.y (sect_constraint): New. - (ONLY_IF_RO, ONLY_IF_RW): New tokens. - (section): Add sect_constraint. Pass additional argument - to lang_enter_output_section_statement. - * mri.c (mri_draw_tree): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/pe.em (place_orphan): Likewise. - (output_prev_sec_find): Disregard output section statements with - constraint == -1. - * emultempl/mmo.em (output_prev_sec_find): Likewise. - (mmo_place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/elf32.em (output_prev_sec_find): Disregard output section - statements with constraint == -1. - (place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * ldlang.c (lang_enter_overlay_section): Likewise. - (lang_output_section_find_1): New. - (lang_output_section_find): Use it. - (lang_output_section_statement_lookup_1): New. - (lang_output_section_statement_lookup): Use it. - (check_section_callback, check_input_sections): New. - (map_input_to_output_sections): Check if all input sections - are readonly if ONLY_IF_RO or ONLY_IF_RW was seen. - (strip_excluded_output_sections): Disregard output section statements - with constraint == -1. - (lang_record_phdrs): Likewise. - (lang_enter_output_section_statement): Add constraint argument. - Use lang_output_section_statement_lookup_1. - * ldlang.h (lang_output_section_statement_type): Add constraint - and all_input_readonly fields. - (lang_enter_output_section_statement): Adjust prototype. - * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens. - * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text - segment if all input sections are readonly. - ---- ld/emultempl/mmo.em.jj Wed Jul 23 11:08:12 2003 -+++ ld/emultempl/mmo.em Mon Jul 28 07:14:02 2003 -@@ -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); - ---- ld/emultempl/pe.em.jj Wed Jul 23 11:08:12 2003 -+++ ld/emultempl/pe.em Mon Jul 28 07:14:02 2003 -@@ -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); - ---- ld/emultempl/elf32.em.jj Wed Jul 23 11:08:12 2003 -+++ ld/emultempl/elf32.em Mon Jul 28 07:14:02 2003 -@@ -1010,7 +1010,8 @@ output_rel_find (asection *sec) - 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) - { - /* Don't place after .rel.plt as doing so results in wrong - dynamic tags. Also, place allocated reloc sections before -@@ -1247,7 +1248,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); - ---- ld/scripttempl/elf.sc.jj Wed Jul 23 11:08:12 2003 -+++ ld/scripttempl/elf.sc Mon Jul 28 07:14:02 2003 -@@ -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}} ---- ld/ldgram.y.jj Wed Jul 23 11:08:12 2003 -+++ ld/ldgram.y Mon Jul 28 07:14:02 2003 -@@ -143,14 +143,14 @@ static int error_index; - %token ORIGIN FILL - %token LENGTH CREATE_OBJECT_SYMBOLS INPUT GROUP OUTPUT CONSTRUCTORS - %token ALIGNMOD AT 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 -@@ -828,21 +828,28 @@ opt_at: - | { $$ = 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 { ldlex_popstate (); ldlex_script (); } -+ sect_constraint - '{' - { - lang_enter_output_section_statement($1, $3, - sectype, -- 0, 0, 0, $4); -+ 0, 0, 0, $4, $6); - } - statement_list_opt - '}' { ldlex_popstate (); ldlex_expression (); } - memspec_opt memspec_at_opt phdr_opt fill_opt - { - ldlex_popstate (); -- lang_leave_output_section_statement ($14, $11, $13, $12); -+ lang_leave_output_section_statement ($15, $12, $14, $13); - } - opt_comma - {} ---- ld/mri.c.jj Wed Jul 23 11:08:12 2003 -+++ ld/mri.c Mon Jul 28 07:15:48 2003 -@@ -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; ---- ld/ldlang.h.jj Wed Jul 23 11:08:12 2003 -+++ ld/ldlang.h Mon Jul 28 07:27:16 2003 -@@ -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 ---- ld/ldlang.c.jj Wed Jul 23 11:08:12 2003 -+++ ld/ldlang.c Mon Jul 28 07:25:24 2003 -@@ -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; -@@ -4684,7 +4781,7 @@ lang_enter_overlay_section (const char * - etree_type *size; - - lang_enter_output_section_statement (name, overlay_vma, normal_section, -- 0, 0, 0, 0); -+ 0, 0, 0, 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 ---- ld/ldlex.l.jj Wed Jul 23 11:08:12 2003 -+++ ld/ldlex.l Mon Jul 28 07:14:02 2003 -@@ -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 --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 deleted file mode 100644 index 518284188fbd..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-place-orphan.patch +++ /dev/null @@ -1,51 +0,0 @@ -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.5-ppc64-elfvsb.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-elfvsb.patch deleted file mode 100644 index 8df8497a1609..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-elfvsb.patch +++ /dev/null @@ -1,24 +0,0 @@ -2003-07-29 Jakub Jelinek <jakub@redhat.com> - - * ld-elfvsb/elf-offset.ld: Add .rel.toc, .rela.toc and .toc - sections. - ---- ld/testsuite/ld-elfvsb/elf-offset.ld.jj 2003-05-19 17:12:47.000000000 -0400 -+++ ld/testsuite/ld-elfvsb/elf-offset.ld 2003-07-29 05:39:34.000000000 -0400 -@@ -46,6 +46,8 @@ SECTIONS - } - .rel.got : { *(.rel.got) } - .rela.got : { *(.rela.got) } -+ .rel.toc : { *(.rel.toc) } -+ .rela.toc : { *(.rela.toc) } - .rel.ctors : { *(.rel.ctors) } - .rela.ctors : { *(.rela.ctors) } - .rel.dtors : { *(.rel.dtors) } -@@ -111,6 +113,7 @@ SECTIONS - KEEP (*(.dtors)) - } - .got : { *(.got.plt) *(.got) } -+ .toc : { *(.toc) } - .dynamic : { *(.dynamic) } - /* We want the small data sections together, so single-instruction offsets - can access them all, and initialized data all before uninitialized, so diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-fdesc.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-fdesc.patch deleted file mode 100644 index 754f81894923..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-fdesc.patch +++ /dev/null @@ -1,26 +0,0 @@ -2003-07-29 Alan Modra <amodra@bigpond.net.au> - - * elf64-ppc.c (func_desc_adjust): Give linker created function - descriptor symbols a size and type. - (ppc64_elf_relocate_section): Correct lq insn test. - ---- bfd/elf64-ppc.c 27 Jul 2003 09:05:08 -0000 1.121 -+++ bfd/elf64-ppc.c 29 Jul 2003 06:47:10 -0000 1.122 -@@ -4310,6 +4310,8 @@ func_desc_adjust (struct elf_link_hash_e - } - fdh = (struct elf_link_hash_entry *) bh; - fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF; -+ fdh->size = 24; -+ fdh->type = STT_OBJECT; - } - - if (fdh != NULL -@@ -8434,7 +8436,7 @@ ppc64_elf_relocate_section (bfd *output_ - _DS relocs bloats all reloc switches in this file. It - doesn't seem to make much sense to use any of these relocs - in data, so testing the insn should be safe. */ -- if ((insn & (0x3f << 26)) == (56 << 26)) -+ if ((insn & (0x3f << 26)) == (56u << 26)) - mask = 15; - if (((relocation + addend) & mask) != 0) - { diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-ldr.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-ldr.patch deleted file mode 100644 index 87bca680c410..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-ldr.patch +++ /dev/null @@ -1,26 +0,0 @@ -2003-07-28 Alan Modra <amodra@bigpond.net.au> - - * emulparams/elf64ppc.sh (GOT): Fix for shell brace matching. - - * emulparams/elf64ppc.sh (GOT): Don't merge .toc into .got for ld -r. - ---- ld/emulparams/elf64ppc.sh.jj Wed Jul 23 11:08:12 2003 -+++ ld/emulparams/elf64ppc.sh Mon Jul 28 10:25:00 2003 -@@ -18,8 +18,15 @@ OTHER_BSS_SYMBOLS=" - .tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}" - OTHER_PLT_RELOC_SECTIONS=" - .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }" --GOT=" -- .got ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.got .toc) }" -+ -+if test x${RELOCATING+set} = xset; then -+ GOT=" -+ .got ALIGN(8) : { *(.got .toc) }" -+else -+ GOT=" -+ .got 0 : { *(.got) } -+ .toc 0 : { *(.toc) }" -+fi - OTHER_GOT_RELOC_SECTIONS=" - .rela.toc ${RELOCATING-0} : { *(.rela.toc) }" - OTHER_READWRITE_SECTIONS=" diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-mask.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-mask.patch deleted file mode 100644 index 6098a6b63cf7..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-mask.patch +++ /dev/null @@ -1,33 +0,0 @@ -2003-07-28 Jakub Jelinek <jakub@redhat.com> - - * ppc-opc.c (insert_mbe, extract_mbe): Shift 1L instead of 1 up. - ---- opcodes/ppc-opc.c 7 Jul 2003 01:34:04 -0000 1.53 -+++ opcodes/ppc-opc.c 28 Jul 2003 21:53:58 -0000 -@@ -1103,7 +1103,7 @@ insert_mbe (unsigned long insn, - /* me: location of last 1->0 transition */ - /* count: # transitions */ - -- for (mx = 0, mask = 1 << 31; mx < 32; ++mx, mask >>= 1) -+ for (mx = 0, mask = 1L << 31; mx < 32; ++mx, mask >>= 1) - { - if ((uval & mask) && !last) - { -@@ -1144,7 +1144,7 @@ extract_mbe (unsigned long insn, - { - ret = 0; - for (i = mb; i <= me; i++) -- ret |= 1 << (31 - i); -+ ret |= 1L << (31 - i); - } - else if (mb == me + 1) - ret = ~0; -@@ -1152,7 +1152,7 @@ extract_mbe (unsigned long insn, - { - ret = ~0; - for (i = me + 1; i < mb; i++) -- ret &= ~(1 << (31 - i)); -+ ret &= ~(1L << (31 - i)); - } - return ret; - } diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-pie.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-pie.patch deleted file mode 100644 index cbb95d4c740f..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-pie.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- bfd/elf64-ppc.c.jj Wed Jul 23 11:08:09 2003 -+++ bfd/elf64-ppc.c Mon Jul 28 07:54:27 2003 -@@ -8208,7 +8208,12 @@ ppc64_elf_relocate_section (bfd *output_ - else if (!SYMBOL_REFERENCES_LOCAL (info, h) - && !is_opd - && r_type != R_PPC64_TOC) -- outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); -+ { -+ outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); -+ if (h->dynindx == -1 -+ && h->root.type == bfd_link_hash_undefweak) -+ memset (&outrel, 0, sizeof outrel); -+ } - else - { - /* This symbol is local, or marked to become local, diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-power4.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-power4.patch deleted file mode 100644 index f5d828319d55..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-ppc64-power4.patch +++ /dev/null @@ -1,15 +0,0 @@ -2003-07-28 Jakub Jelinek <jakub@redhat.com> - - * config/tc-ppc.c (md_apply_fix3): Fix check for lq insns. - ---- gas/config/tc-ppc.c.jj 2003-07-10 07:30:15.000000000 -0400 -+++ gas/config/tc-ppc.c 2003-07-28 14:07:29.000000000 -0400 -@@ -5742,7 +5742,7 @@ md_apply_fix3 (fixP, valP, seg) - mask = 0xfffc; - /* lq insns reserve the four lsbs. */ - if ((ppc_cpu & PPC_OPCODE_POWER4) != 0 -- && (val & (0x3f << 26)) == (56 << 26)) -+ && (val & (0x3f << 26)) == (56u << 26)) - mask = 0xfff0; - val |= value & mask; - if (target_big_endian) diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-s390-pie.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-s390-pie.patch deleted file mode 100644 index 33f38c87aee8..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.5-s390-pie.patch +++ /dev/null @@ -1,59 +0,0 @@ -2003-07-04 Jakub Jelinek <jakub@redhat.com> - - * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL - for pc relative relocs. - (elf_s390_relocate_section): Likewise. - * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL - for pc relative relocs. - (elf_s390_relocate_section): Likewise. - ---- bfd/elf32-s390.c.jj Wed Jun 25 07:53:21 2003 -+++ bfd/elf32-s390.c Fri Jul 4 12:08:11 2003 -@@ -1808,9 +1808,7 @@ allocate_dynrelocs (h, inf) - - if (info->shared) - { -- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 -- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 -- || info->symbolic)) -+ if (SYMBOL_REFERENCES_LOCAL (info, h)) - { - struct elf_s390_dyn_relocs **pp; - -@@ -2519,10 +2517,7 @@ elf_s390_relocate_section (output_bfd, i - && r_type != R_390_PC32DBL - && r_type != R_390_PC32) - || (h != NULL -- && h->dynindx != -1 -- && (! info->symbolic -- || (h->elf_link_hash_flags -- & ELF_LINK_HASH_DEF_REGULAR) == 0)))) -+ && !SYMBOL_REFERENCES_LOCAL (info, h)))) - || (ELIMINATE_COPY_RELOCS - && !info->shared - && h != NULL ---- bfd/elf64-s390.c.jj 2003-07-04 15:10:57.000000000 -0400 -+++ bfd/elf64-s390.c 2003-07-04 15:24:06.000000000 -0400 -@@ -1780,9 +1780,7 @@ allocate_dynrelocs (h, inf) - - if (info->shared) - { -- if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0 -- && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0 -- || info->symbolic)) -+ if (SYMBOL_REFERENCES_LOCAL (info, h)) - { - struct elf_s390_dyn_relocs **pp; - -@@ -2498,10 +2496,7 @@ elf_s390_relocate_section (output_bfd, i - && r_type != R_390_PC32DBL - && r_type != R_390_PC64) - || (h != NULL -- && h->dynindx != -1 -- && (! info->symbolic -- || (h->elf_link_hash_flags -- & ELF_LINK_HASH_DEF_REGULAR) == 0)))) -+ && !SYMBOL_REFERENCES_LOCAL (info, h)))) - || (ELIMINATE_COPY_RELOCS - && !info->shared - && h != NULL diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch deleted file mode 100644 index 065c6c4f8374..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- binutils-2.14.90.0.6/bfd/elf.c.orig 2003-10-05 23:59:42.643768200 +0200 -+++ binutils-2.14.90.0.6/bfd/elf.c 2003-10-05 23:59:57.194556144 +0200 -@@ -2044,7 +2044,7 @@ - { ".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 }, -+ { ".interp", 7, 0, SHT_PROGBITS, SHF_ALLOC }, - { ".plt", 4, 0, SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, - { ".shstrtab", 9, 0, SHT_STRTAB, 0 }, - { ".strtab", 7, 0, SHT_STRTAB, 0 }, diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch deleted file mode 100644 index f07be8a246f2..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch +++ /dev/null @@ -1,40 +0,0 @@ -2003-10-21 H.J. Lu <hongjiu.lu@intel.com> - - * config/obj-elf.c (obj_elf_change_section): Allow SHF_ALLOC - for .interp, .strtab and .symtab. Use specified section - attributes. - ---- gas/config/obj-elf.c.attr 2003-09-23 08:16:44.000000000 -0700 -+++ gas/config/obj-elf.c 2003-10-21 23:26:06.000000000 -0700 -@@ -615,6 +615,7 @@ obj_elf_change_section (name, type, attr - segT sec; - flagword flags; - const struct bfd_elf_special_section *ssect; -+ bfd_boolean override = FALSE; - - #ifdef md_flush_pending_output - md_flush_pending_output (); -@@ -684,11 +685,20 @@ obj_elf_change_section (name, type, attr - && name[ssect->prefix_length] == '.' - && (attr &~ ssect->attr &~ SHF_MERGE &~ SHF_STRINGS) == 0) - ; -+ /* .interp, .strtab and .symtab can have SHF_ALLOC. */ -+ else if (attr == SHF_ALLOC -+ && (strcmp (name, ".interp") == 0 -+ || strcmp (name, ".strtab") == 0 -+ || strcmp (name, ".symtab") == 0)) -+ override = TRUE; - else -- as_warn (_("setting incorrect section attributes for %s"), -- name); -+ { -+ as_warn (_("setting incorrect section attributes for %s"), -+ name); -+ override = TRUE; -+ } - } -- if (old_sec == NULL) -+ if (!override && old_sec == NULL) - attr |= ssect->attr; - } - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch deleted file mode 100644 index f09a8af70e43..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- bfd/elf.c.orig 2003-09-20 11:51:36.000000000 -0400 -+++ bfd/elf.c 2003-09-20 11:51:36.000000000 -0400 -@@ -2069,7 +2069,7 @@ - SHT_PROGBITS, SHF_ALLOC + SHF_WRITE }, - { ".hash", 0, NULL, 0, - SHT_HASH, SHF_ALLOC }, -- { ".interp", 0, NULL, 0, -+ { ".interp", SHF_ALLOC, NULL, 0, - SHT_PROGBITS, 0 }, - { ".plt", 0, NULL, 0, - SHT_PROGBITS, SHF_ALLOC + SHF_EXECINSTR }, diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-build_modules.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-build_modules.patch deleted file mode 100644 index e9f8e75a891e..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-build_modules.patch +++ /dev/null @@ -1,31 +0,0 @@ -Get around an odd build failure. -diff -urN binutils-2.14.90.0.6/configure binutils-2.14.90.0.6-uClibc/configure ---- binutils-2.14.90.0.6/configure 2003-08-21 10:29:32.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/configure 2004-01-07 05:43:40.000000000 -0600 -@@ -906,6 +906,11 @@ - fi - - -+case "$target" in -+ *-*-*-uclibc*) -+ build_modules= -+ ;; -+esac - ################################################################################ - - srcname="gnu development package" -diff -urN binutils-2.14.90.0.6/configure.in binutils-2.14.90.0.6-uClibc/configure.in ---- binutils-2.14.90.0.6/configure.in 2003-08-21 10:29:30.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/configure.in 2004-01-07 05:44:02.000000000 -0600 -@@ -178,6 +178,11 @@ - fi - - -+case "$target" in -+ *-*-*-uclibc*) -+ build_modules= -+ ;; -+esac - ################################################################################ - - srcname="gnu development package" diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cflags.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cflags.patch deleted file mode 100644 index dc67d3c4e34d..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cflags.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.am binutils-2.14.90.0.6.new/bfd/doc/Makefile.am ---- binutils-2.14.90.0.6/bfd/doc/Makefile.am 2003-07-23 10:08:09.000000000 -0500 -+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.am 2004-03-01 16:05:16.000000000 -0600 -@@ -55,10 +55,10 @@ - MKDOC = chew$(EXEEXT_FOR_BUILD) - - $(MKDOC): chew.o -- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) -+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS) - - chew.o: chew.c -- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c -+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c - - protos: libbfd.h libcoff.h bfd.h - -diff -urN binutils-2.14.90.0.6/bfd/doc/Makefile.in binutils-2.14.90.0.6.new/bfd/doc/Makefile.in ---- binutils-2.14.90.0.6/bfd/doc/Makefile.in 2003-07-23 10:08:09.000000000 -0500 -+++ binutils-2.14.90.0.6.new/bfd/doc/Makefile.in 2004-03-01 16:05:03.000000000 -0600 -@@ -469,10 +469,10 @@ - - - $(MKDOC): chew.o -- $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS) $(LOADLIBES) $(LDFLAGS) -+ $(CC_FOR_BUILD) -o $(MKDOC) chew.o $(CFLAGS_FOR_BUILD) $(LOADLIBES) $(LDFLAGS) - - chew.o: chew.c -- $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS) $(srcdir)/chew.c -+ $(CC_FOR_BUILD) -c -I.. -I$(srcdir)/.. -I$(srcdir)/../../include -I$(srcdir)/../../intl -I../../intl $(H_CFLAGS) $(CFLAGS_FOR_BUILD) $(srcdir)/chew.c - - protos: libbfd.h libcoff.h bfd.h - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-conf.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-conf.patch deleted file mode 100644 index b368b0f2e4f5..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-conf.patch +++ /dev/null @@ -1,648 +0,0 @@ -diff -urN binutils-2.14.90.0.6/bfd/config.bfd binutils-2.14.90.0.6-uClibc/bfd/config.bfd ---- binutils-2.14.90.0.6/bfd/config.bfd 2003-08-21 10:28:47.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/bfd/config.bfd 2004-01-06 23:20:32.000000000 -0600 -@@ -121,7 +121,7 @@ - targ_defvec=ecoffalpha_little_vec - targ_selvecs=bfd_elf64_alpha_vec - ;; -- alpha*-*-linux-gnu* | alpha*-*-elf*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*) - targ_defvec=bfd_elf64_alpha_vec - targ_selvecs=ecoffalpha_little_vec - ;; -@@ -131,7 +131,8 @@ - alpha*-*-*) - targ_defvec=ecoffalpha_little_vec - ;; -- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf*) -+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | \ -+ ia64*-*-linux-uclibc* | ia64*-*-elf*) - targ_defvec=bfd_elf64_ia64_little_vec - targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" - ;; -@@ -214,7 +215,7 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- armeb-*-elf | arm*b-*-linux-gnu*) -+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*) - targ_defvec=bfd_elf32_bigarm_vec - targ_selvecs=bfd_elf32_littlearm_vec - ;; -@@ -222,7 +223,8 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | arm*-*-uclinux*) -+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | \ -+ arm*-*-conix* | arm*-*-uclinux*) - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -@@ -355,7 +357,7 @@ - ;; - - #ifdef BFD64 -- hppa*64*-*-linux-gnu*) -+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) - targ_defvec=bfd_elf64_hppa_linux_vec - targ_selvecs=bfd_elf64_hppa_vec - ;; -@@ -366,7 +368,7 @@ - ;; - #endif - -- hppa*-*-linux-gnu*) -+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) - targ_defvec=bfd_elf32_hppa_linux_vec - targ_selvecs=bfd_elf32_hppa_vec - ;; -@@ -488,7 +490,7 @@ - targ_selvecs=bfd_elf32_i386_vec - targ_underscore=yes - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" - targ64_selvecs=bfd_elf64_x86_64_vec -@@ -502,7 +504,7 @@ - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" - ;; -- x86_64-*-linux-gnu*) -+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" - ;; -@@ -662,7 +664,7 @@ - targ_selvecs=bfd_elf32_m68k_vec - targ_underscore=yes - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - targ_defvec=bfd_elf32_m68k_vec - targ_selvecs=m68klinux_vec - ;; -@@ -929,7 +931,8 @@ - ;; - #endif - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ -- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ -+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \ -+ powerpc-*-rtems* | \ - powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) - targ_defvec=bfd_elf32_powerpc_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" -@@ -961,8 +964,8 @@ - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - ;; - powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ -- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\ -- powerpcle-*-rtems*) -+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\ -+ powerpcle-*-vxworks* | powerpcle-*-rtems*) - targ_defvec=bfd_elf32_powerpcle_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" -@@ -1110,7 +1113,7 @@ - targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" - targ_underscore=yes - ;; -- sparc-*-linux-gnu*) -+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*) - targ_defvec=bfd_elf32_sparc_vec - targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec" - ;; -@@ -1157,7 +1160,7 @@ - targ_defvec=sunos_big_vec - targ_underscore=yes - ;; -- sparc64-*-linux-gnu*) -+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) - targ_defvec=bfd_elf64_sparc_vec - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" - ;; -diff -urN binutils-2.14.90.0.6/bfd/configure binutils-2.14.90.0.6-uClibc/bfd/configure ---- binutils-2.14.90.0.6/bfd/configure 2003-08-21 10:28:47.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/bfd/configure 2004-01-06 20:26:51.000000000 -0600 -@@ -1698,6 +1698,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -5102,7 +5107,7 @@ - alpha*-*-freebsd*) - COREFILE='' - ;; -- alpha*-*-linux-gnu*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; -@@ -5161,7 +5166,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386mach3.h"' - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' - ;; -@@ -5211,7 +5216,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; -diff -urN binutils-2.14.90.0.6/bfd/configure.in binutils-2.14.90.0.6-uClibc/bfd/configure.in ---- binutils-2.14.90.0.6/bfd/configure.in 2003-08-21 10:28:47.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/bfd/configure.in 2004-01-06 20:33:02.000000000 -0600 -@@ -153,7 +153,7 @@ - alpha*-*-freebsd*) - COREFILE='' - ;; -- alpha*-*-linux-gnu*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; -@@ -233,7 +233,7 @@ - TRAD_HEADER='"hosts/i386mach3.h"' - ;; - changequote(,)dnl -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - changequote([,])dnl - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' -@@ -286,7 +286,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; -diff -urN binutils-2.14.90.0.6/config.sub binutils-2.14.90.0.6-uClibc/config.sub ---- binutils-2.14.90.0.6/config.sub 2003-08-21 10:28:47.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/config.sub 2004-01-06 22:56:56.000000000 -0600 -@@ -118,7 +118,7 @@ - # Here we must recognize all the valid KERNEL-OS combinations. - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in -- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) -+ nto-qnx* | linux-gnu* | linux-uclibc* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -@@ -1131,7 +1131,8 @@ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ -+ | -mingw32* | -linux-gnu* | -linux-uclibc* \ -+ | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ -diff -urN binutils-2.14.90.0.6/configure binutils-2.14.90.0.6-uClibc/configure ---- binutils-2.14.90.0.6/configure 2003-08-21 10:29:32.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/configure 2004-01-07 05:43:40.000000000 -0600 -@@ -1257,6 +1262,18 @@ - i[3456789]86-*-freebsd*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; -+ i[3456789]86-*-linux-uclibc) -+ # This section makes it possible to build newlib natively on linux. -+ # If we are using a cross compiler then don't configure newlib. -+ if test x${is_cross_compiler} != xno ; then -+ noconfigdirs="$noconfigdirs target-newlib" -+ fi -+ noconfigdirs="$noconfigdirs target-libgloss" -+ # If we are not using a cross compiler, do configure newlib. -+ # Note however, that newlib will only be configured in this situation -+ # if the --with-newlib option has been given, because otherwise -+ # 'target-newlib' will appear in skipdirs. -+ ;; - i[3456789]86-*-linux*) - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's - # not build java stuff by default. -diff -urN binutils-2.14.90.0.6/configure.in binutils-2.14.90.0.6-uClibc/configure.in ---- binutils-2.14.90.0.6/configure.in 2003-08-21 10:29:30.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/configure.in 2004-01-07 05:44:02.000000000 -0600 -@@ -508,6 +513,19 @@ - i[[3456789]]86-*-freebsd*) - noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; -+ i[3456789]86-*-linux-uclibc) -+ # This section makes it possible to build newlib natively on linux. -+ # If we are using a cross compiler then don't configure newlib. -+ if test x${is_cross_compiler} != xno ; then -+ noconfigdirs="$noconfigdirs target-newlib" -+ fi -+ noconfigdirs="$noconfigdirs target-libgloss" -+ build_modules= -+ # If we are not using a cross compiler, do configure newlib. -+ # Note however, that newlib will only be configured in this situation -+ # if the --with-newlib option has been given, because otherwise -+ # 'target-newlib' will appear in skipdirs. -+ ;; - i[[3456789]]86-*-linux*) - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's - # not build java stuff by default. -diff -urN binutils-2.14.90.0.6/demangler/configure binutils-2.14.90.0.6-uClibc/demangler/configure ---- binutils-2.14.90.0.6/demangler/configure 2003-08-21 10:29:31.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/demangler/configure 2004-01-06 21:45:51.000000000 -0600 -@@ -1363,6 +1363,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.14.90.0.6/gas/configure binutils-2.14.90.0.6-uClibc/gas/configure ---- binutils-2.14.90.0.6/gas/configure 2003-07-23 10:08:10.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/gas/configure 2004-01-06 21:57:25.000000000 -0600 -@@ -1576,6 +1576,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -2370,6 +2375,7 @@ - alpha*-*-osf*) fmt=ecoff ;; - alpha*-*-linuxecoff*) fmt=ecoff ;; - alpha*-*-linux-gnu*) fmt=elf em=linux ;; -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; - alpha*-*-netbsd*) fmt=elf em=nbsd ;; - alpha*-*-openbsd*) fmt=elf em=obsd ;; - -@@ -2386,6 +2392,7 @@ - arm*-*-conix*) fmt=elf ;; - arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;; - arm*-*-uclinux*) fmt=elf em=linux ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; -@@ -2400,6 +2407,7 @@ - avr-*-*) fmt=elf ;; - - cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;; -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; - cris-*-*) fmt=multi bfd_gas=yes ;; - - d10v-*-*) fmt=elf ;; -@@ -2455,7 +2463,9 @@ - i386-*-linux*oldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux ;; - i386-*-linux-gnu*) fmt=elf em=linux ;; -+ i386-*-linux-uclibc*) fmt=elf em=linux ;; - x86_64-*-linux-gnu*) fmt=elf em=linux ;; -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv[45]*) fmt=elf ;; - i386-*-solaris*) fmt=elf ;; -@@ -2512,6 +2522,7 @@ - ia64-*-elf*) fmt=elf ;; - ia64-*-aix*) fmt=elf em=ia64aix ;; - ia64-*-linux-gnu*) fmt=elf em=linux ;; -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;; - ia64-*-hpux*) fmt=elf em=hpux ;; - ia64-*-netbsd*) fmt=elf em=nbsd ;; - -@@ -2538,6 +2549,7 @@ - m68k-*-hpux*) fmt=hp300 em=hp300 ;; - m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux-gnu*) fmt=elf em=linux ;; -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;; - m68k-*-gnu*) fmt=elf ;; - m68k-*-lynxos*) fmt=coff em=lynx ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; -@@ -2592,6 +2604,7 @@ - ppc-*-beos*) fmt=coff ;; - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; -+ ppc-*-linux-uclibc* | \ - ppc-*-linux-gnu*) fmt=elf - case "$endian" in - big) ;; -@@ -2616,7 +2629,9 @@ - ppc-*-kaos*) fmt=elf ;; - - s390x-*-linux-gnu*) fmt=elf em=linux ;; -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-linux-gnu*) fmt=elf em=linux ;; -+ s390-*-linux-uclibc*) fmt=elf em=linux ;; - - sh*-*-linux*) fmt=elf em=linux - case ${cpu} in -@@ -2649,6 +2664,7 @@ - sparc-*-coff) fmt=coff ;; - sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux-gnu*) fmt=elf em=linux ;; -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;; - sparc-*-lynxos*) fmt=coff em=lynx ;; - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; -diff -urN binutils-2.14.90.0.6/gas/configure.in binutils-2.14.90.0.6-uClibc/gas/configure.in ---- binutils-2.14.90.0.6/gas/configure.in 2003-07-23 10:08:10.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/gas/configure.in 2004-01-06 21:57:26.000000000 -0600 -@@ -184,6 +184,7 @@ - alpha*-*-osf*) fmt=ecoff ;; - alpha*-*-linuxecoff*) fmt=ecoff ;; - alpha*-*-linux-gnu*) fmt=elf em=linux ;; -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; - alpha*-*-netbsd*) fmt=elf em=nbsd ;; - alpha*-*-openbsd*) fmt=elf em=obsd ;; - -@@ -200,6 +201,7 @@ - arm*-*-conix*) fmt=elf ;; - arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;; - arm*-*-uclinux*) fmt=elf em=linux ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; -@@ -214,6 +216,7 @@ - avr-*-*) fmt=elf ;; - - cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;; -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; - cris-*-*) fmt=multi bfd_gas=yes ;; - - d10v-*-*) fmt=elf ;; -@@ -269,7 +272,9 @@ - i386-*-linux*oldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux ;; - i386-*-linux-gnu*) fmt=elf em=linux ;; -+ i386-*-linux-uclibc*) fmt=elf em=linux ;; - x86_64-*-linux-gnu*) fmt=elf em=linux ;; -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff em=lynx ;; - changequote(,)dnl - i386-*-sysv[45]*) fmt=elf ;; -@@ -322,6 +327,7 @@ - ia64-*-elf*) fmt=elf ;; - ia64-*-aix*) fmt=elf em=ia64aix ;; - ia64-*-linux-gnu*) fmt=elf em=linux ;; -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;; - ia64-*-hpux*) fmt=elf em=hpux ;; - ia64-*-netbsd*) fmt=elf em=nbsd ;; - -@@ -348,6 +354,7 @@ - m68k-*-hpux*) fmt=hp300 em=hp300 ;; - m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux-gnu*) fmt=elf em=linux ;; -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;; - m68k-*-gnu*) fmt=elf ;; - m68k-*-lynxos*) fmt=coff em=lynx ;; - m68k-*-netbsdelf*) fmt=elf em=nbsd ;; -@@ -402,6 +409,7 @@ - ppc-*-beos*) fmt=coff ;; - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; -+ ppc-*-linux-uclibc* | \ - ppc-*-linux-gnu*) fmt=elf - case "$endian" in - big) ;; -@@ -424,7 +432,9 @@ - ppc-*-kaos*) fmt=elf ;; - - s390x-*-linux-gnu*) fmt=elf em=linux ;; -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-linux-gnu*) fmt=elf em=linux ;; -+ s390-*-linux-uclibc*) fmt=elf em=linux ;; - - sh*-*-linux*) fmt=elf em=linux - case ${cpu} in -@@ -457,6 +467,7 @@ - sparc-*-coff) fmt=coff ;; - sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux-gnu*) fmt=elf em=linux ;; -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;; - sparc-*-lynxos*) fmt=coff em=lynx ;; - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; -diff -urN binutils-2.14.90.0.6/ld/configure binutils-2.14.90.0.6-uClibc/ld/configure ---- binutils-2.14.90.0.6/ld/configure 2003-05-05 16:46:49.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/ld/configure 2004-01-06 21:59:31.000000000 -0600 -@@ -1578,6 +1578,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.14.90.0.6/ld/configure.tgt binutils-2.14.90.0.6-uClibc/ld/configure.tgt ---- binutils-2.14.90.0.6/ld/configure.tgt 2003-08-21 10:28:48.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/ld/configure.tgt 2004-01-06 22:09:40.000000000 -0600 -@@ -30,6 +30,7 @@ - targ_extra_emuls="criself crislinux" - targ_extra_libpath=$targ_extra_emuls ;; - cris-*-linux-gnu*) targ_emul=crislinux ;; -+cris-*-linux-uclibc*) targ_emul=crislinux ;; - cris-*-*) targ_emul=criself - targ_extra_emuls="crisaout crislinux" - targ_extra_libpath=$targ_extra_emuls ;; -@@ -59,14 +60,16 @@ - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'` - tdir_sun4=sparc-sun-sunos4 - ;; --sparc64-*-linux-gnu*) targ_emul=elf64_sparc -+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \ -+ targ_emul=elf64_sparc - targ_extra_emuls="elf32_sparc sparclinux sun4" - targ_extra_libpath=elf32_sparc - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` - tdir_sparclinux=${tdir_elf32_sparc}aout - tdir_sun4=sparc-sun-sunos4 - ;; --sparc*-*-linux-gnu*) targ_emul=elf32_sparc -+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \ -+ targ_emul=elf32_sparc - targ_extra_emuls="sparclinux elf64_sparc sun4" - targ_extra_libpath=elf64_sparc - tdir_sparclinux=${targ_alias}aout -@@ -124,7 +127,7 @@ - m68*-ericsson-ose) targ_emul=sun3 ;; - m68*-apple-aux*) targ_emul=m68kaux ;; - *-tandem-none) targ_emul=st2000 ;; --i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; -+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;; - i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; - i[3-7]86-*-vsta) targ_emul=vsta ;; - i[3-7]86-go32-rtems*) targ_emul=i386go32 ;; -@@ -148,16 +151,18 @@ - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` - ;; - i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; --i[3-7]86-*-linux-gnu*) targ_emul=elf_i386 -+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \ -+ targ_emul=elf_i386 - targ_extra_emuls=i386linux - if test x${want64} = xtrue; then - targ_extra_emuls="$targ_extra_emuls elf_x86_64" - fi - targ_extra_emuls="i386linux elf_i386_glibc21" - targ_extra_libpath=elf_i386_glibc21 - tdir_i386linux=${targ_alias}aout - ;; --x86_64-*-linux-gnu*) targ_emul=elf_x86_64 -+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \ -+ targ_emul=elf_x86_64 - targ_extra_emuls="elf_i386 i386linux" - targ_extra_libpath=elf_i386 - tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` -@@ -250,10 +255,13 @@ - arm9e-*-elf) targ_emul=armelf ;; - arm-*-oabi) targ_emul=armelf_oabi ;; - arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; -+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; - arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-conix*) targ_emul=armelf ;; --thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \ -+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - strongarm-*-coff) targ_emul=armcoff ;; - strongarm-*-elf) targ_emul=armelf ;; - strongarm-*-kaos*) targ_emul=armelf ;; -@@ -354,7 +362,8 @@ - targ_extra_emuls=m68kelf - tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` - ;; --m68k-*-linux-gnu*) targ_emul=m68kelf -+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \ -+ targ_emul=m68kelf - targ_extra_emuls=m68klinux - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` - ;; -@@ -370,9 +379,9 @@ - m68*-*-psos*) targ_emul=m68kpsos ;; - m68*-*-rtemscoff*) targ_emul=m68kcoff ;; - m68*-*-rtems*) targ_emul=m68kelf ;; --hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; -+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;; - hppa*64*-*) targ_emul=elf64hppa ;; --hppa*-*-linux-gnu*) targ_emul=hppalinux ;; -+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;; - hppa*-*-*elf*) targ_emul=hppaelf ;; - hppa*-*-lites*) targ_emul=hppaelf ;; - hppa*-*-netbsd*) targ_emul=hppanbsd ;; -@@ -416,16 +425,20 @@ - mips*-*-rtems*) targ_emul=elf32ebmip ;; - mips*el-*-vxworks*) targ_emul=elf32elmip ;; - mips*-*-vxworks*) targ_emul=elf32ebmip ;; --mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32 -+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) \ -+ targ_emul=elf32ltsmipn32 - targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" - ;; --mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32 -+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) \ -+ targ_emul=elf32btsmipn32 - targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" - ;; --mips*el-*-linux-gnu*) targ_emul=elf32ltsmip -+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) \ -+ targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" - ;; --mips*-*-linux-gnu*) targ_emul=elf32btsmip -+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) \ -+ targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" - ;; - mips*-*-lnews*) targ_emul=mipslnews ;; -@@ -447,6 +460,10 @@ - alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha - tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` - ;; -+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha -+ # The following needs to be checked... -+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` -+ ;; - alpha*-*-osf*) targ_emul=alpha ;; - alpha*-*-gnu*) targ_emul=elf64alpha ;; - alpha*-*-netware*) targ_emul=alpha ;; -diff -urN binutils-2.14.90.0.6/libtool.m4 binutils-2.14.90.0.6-uClibc/libtool.m4 ---- binutils-2.14.90.0.6/libtool.m4 2003-05-05 16:46:46.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/libtool.m4 2004-01-06 20:30:39.000000000 -0600 -@@ -645,6 +645,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -urN binutils-2.14.90.0.6/ltconfig binutils-2.14.90.0.6-uClibc/ltconfig ---- binutils-2.14.90.0.6/ltconfig 2003-07-23 10:08:08.000000000 -0500 -+++ binutils-2.14.90.0.6-uClibc/ltconfig 2004-01-06 21:05:11.000000000 -0600 -@@ -603,6 +603,7 @@ - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in - linux-gnu*) ;; -+linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1259,6 +1260,24 @@ - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ # Note: copied from linux-gnu, and may not be appropriate. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-debian.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-debian.patch deleted file mode 100644 index be1cc2a7eb71..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-debian.patch +++ /dev/null @@ -1,174 +0,0 @@ ---- binutils-2.11.90.0.19.orig/ld/Makefile.am -+++ binutils-2.11.90.0.19/ld/Makefile.am -@@ -19,7 +19,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- binutils-2.11.90.0.19.orig/ld/Makefile.in -+++ binutils-2.11.90.0.19/ld/Makefile.in -@@ -123,7 +123,7 @@ - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ -diff -urN binutils-2.11.90.0.27/gprof/gprof.texi binutils-2.11.90.0.27.new/gprof/gprof.texi ---- binutils-2.11.90.0.27/gprof/gprof.texi Tue Jun 19 14:57:58 2001 -+++ binutils-2.11.90.0.27.new/gprof/gprof.texi Mon Aug 27 10:27:23 2001 -@@ -137,6 +137,10 @@ - If more than one profile file is specified, the @code{gprof} - output shows the sum of the profile information in the given profile files. - -+If you use gcc 2.95.x or 3.0 to compile your binaries, you may need -+to add the @samp{-fprofile-arcs} to the compile command line in order -+for the call graphs to be properly stored in gmon.out. -+ - @code{Gprof} calculates the amount of time spent in each routine. - Next, these times are propagated along the edges of the call graph. - Cycles are discovered, and calls into a cycle are made to share the time -@@ -266,6 +270,11 @@ - to do the linking, simply specify @samp{-pg} in addition to your usual - options. The same option, @samp{-pg}, alters either compilation or linking - to do what is necessary for profiling. Here are examples: -+ -+If you use gcc 2.95.x or 3.0.x, you may need to add the -+@samp{-fprofile-arcs} option to the compile line along with @samp{-pg} -+in order to allow the call-graphs to be properly included in the gmon.out -+file. - - @example - cc -g -c myprog.c utils.c -pg -diff -urN binutils-2.11.92.0.5/bfd/opncls.c binutils-2.11.92.0.5.new/bfd/opncls.c ---- binutils-2.11.92.0.5/bfd/opncls.c Mon Oct 1 18:25:21 2001 -+++ binutils-2.11.92.0.5.new/bfd/opncls.c Sat Oct 13 11:26:59 2001 -@@ -127,6 +127,13 @@ - { - bfd *nbfd; - const bfd_target *target_vec; -+ struct stat s; -+ -+ if (stat (filename, &s) == 0) -+ if (S_ISDIR(s.st_mode)) { -+ bfd_set_error (bfd_error_file_not_recognized); -+ return NULL; -+ } - - nbfd = _bfd_new_bfd (); - if (nbfd == NULL) -diff -urN binutils-2.11.92.0.12.3/opcodes/i386-dis.c binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c ---- binutils-2.11.92.0.12.3/opcodes/i386-dis.c Fri Nov 16 17:05:55 2001 -+++ binutils-2.11.92.0.12.3.new/opcodes/i386-dis.c Mon Dec 31 15:55:04 2001 -@@ -1830,7 +1830,7 @@ - * The function returns the length of this instruction in bytes. - */ - --static char intel_syntax; -+static signed char intel_syntax; - static char open_char; - static char close_char; - static char separator_char; -diff -urN binutils-2.12.90.0.12/ld/emultempl/elf32.em binutils-2.12.90.0.12.new/ld/emultempl/elf32.em ---- binutils-2.12.90.0.12/ld/emultempl/elf32.em Wed Jun 19 00:41:59 2002 -+++ binutils-2.12.90.0.12.new/ld/emultempl/elf32.em Wed Jun 26 10:00:26 2002 -@@ -672,6 +672,8 @@ - && command_line.rpath == NULL) - { - lib_path = (const char *) getenv ("LD_RUN_PATH"); -+ if ((lib_path) && (strlen (lib_path) == 0)) -+ lib_path = NULL; - if (gld${EMULATION_NAME}_search_needed (lib_path, l->name, - force)) - break; -@@ -867,6 +869,8 @@ - rpath = command_line.rpath; - if (rpath == NULL) - rpath = (const char *) getenv ("LD_RUN_PATH"); -+ if ((rpath) && (strlen (rpath) == 0)) -+ rpath = NULL; - if (! (bfd_elf${ELFSIZE}_size_dynamic_sections - (output_bfd, command_line.soname, rpath, - command_line.filter_shlib, -diff -urN binutils-2.13.90.0.18/gprof/gprof.texi binutils-2.13.90.0.18.new/gprof/gprof.texi ---- binutils-2.13.90.0.18/gprof/gprof.texi 2003-02-02 18:29:09.000000000 -0500 -+++ binutils-2.13.90.0.18.new/gprof/gprof.texi 2003-02-02 18:28:37.000000000 -0500 -@@ -185,7 +185,7 @@ - @c man end - - @c man begin SEEALSO --monitor(3), profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. -+profil(2), cc(1), prof(1), and the Info entry for @file{gprof}. - - ``An Execution Profiler for Modular Programs'', - by S. Graham, P. Kessler, M. McKusick; -diff -urN binutils-2.13.90.0.10/opcodes/alpha-opc.c binutils-2.13.90.0.10.new/opcodes/alpha-opc.c ---- binutils-2.13.90.0.10/opcodes/alpha-opc.c 2002-03-07 14:52:40.000000000 -0500 -+++ binutils-2.13.90.0.10.new/opcodes/alpha-opc.c 2002-10-12 20:16:08.000000000 -0400 -@@ -1101,7 +1101,8 @@ - { "wmb", MFC(0x18,0x4400), BASE, ARG_NONE }, - { "fetch", MFC(0x18,0x8000), BASE, { ZA, PRB } }, - { "fetch_m", MFC(0x18,0xA000), BASE, { ZA, PRB } }, -- { "rpcc", MFC(0x18,0xC000), BASE, { RA } }, -+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, ZB } }, -+ { "rpcc", MFC(0x18,0xC000), BASE, { RA, RB } }, /* ev6 una */ - { "rc", MFC(0x18,0xE000), BASE, { RA } }, - { "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */ - { "rs", MFC(0x18,0xF000), BASE, { RA } }, ---- binutils-2.13.90.0.18/bfd/elf64-alpha.c 2003-01-21 19:21:32.000000000 +0100 -+++ binutils-2.13.90.0.18-modif/bfd/elf64-alpha.c 2003-04-11 01:24:26.000000000 +0200 -@@ -4184,9 +4184,12 @@ - - loc = srel->contents; - loc += srel->reloc_count++ * sizeof (Elf64_External_Rela); -- bfd_elf64_swap_reloca_out (abfd, &outrel, loc); -- BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count -- <= srel->_cooked_size); -+ if (loc) -+ { -+ bfd_elf64_swap_reloca_out (abfd, &outrel, loc); -+ BFD_ASSERT (sizeof (Elf64_External_Rela) * srel->reloc_count -+ <= srel->_cooked_size); -+ } - } - - /* Relocate an Alpha ELF section for a relocatable link. -2003-05-23 H.J. Lu <hongjiu.lu@intel.com> - - * ltmain.sh: Make symlink for shared library if needed. - -opcodes/ - -2003-07-14 H.J. Lu <hongjiu.lu@intel.com> - - * Makefile.in: Regenerated. - -2003-06-11 H.J. Lu <hongjiu.lu@intel.com> - - * Makefile.in: Regenerated. - -2003-05-23 H.J. Lu <hongjiu.lu@intel.com> - - * Makefile.am (libopcodes_la_LIBADD): Use "-L../bfd -lbfd" - instead of "../bfd/libbfd.la". - * Makefile.in: Regenerated. - ---- binutils/ltmain.sh.dso 2002-03-22 00:16:20.000000000 -0800 -+++ binutils/ltmain.sh 2003-07-14 12:50:17.000000000 -0700 -@@ -4413,6 +4413,10 @@ relink_command=\"$relink_command\"" - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? -+ if test -n "$linkname"; then -+ $show "(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)" -+ $run eval '(cd $output_objdir && $rm ../$linkname && $LN_S $output_objdir/$linkname ../$linkname)' || exit $? -+ fi - ;; - esac - exit 0 diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch deleted file mode 100644 index 9bf07a0b2f3c..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch +++ /dev/null @@ -1,23 +0,0 @@ -It's a bug in handling of absolute symbols. - - * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner. - -Index: bfd/elflink.h -=================================================================== -RCS file: /cvs/src/src/bfd/elflink.h,v -retrieving revision 1.239 -diff -u -p -r1.239 elflink.h ---- bfd/elflink.h 20 Aug 2003 08:37:19 -0000 1.239 -+++ bfd/elflink.h 23 Aug 2003 04:02:17 -0000 -@@ -1186,7 +1186,8 @@ elf_link_add_object_symbols (bfd *abfd, - bfd *common_bfd; - - symbol_align = ffs (h->root.u.def.value) - 1; -- if ((h->root.u.def.section->owner->flags & DYNAMIC) == 0) -+ if (h->root.u.def.section->owner != NULL -+ && (h->root.u.def.section->owner->flags & DYNAMIC) == 0) - { - normal_align = h->root.u.def.section->alignment_power; - if (normal_align > symbol_align) - - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch deleted file mode 100644 index c0b1c13cdaff..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch +++ /dev/null @@ -1,427 +0,0 @@ -2002-11-22 Jakub Jelinek <jakub@redhat.com> - - * ldgram.y (sect_constraint): New. - (ONLY_IF_RO, ONLY_IF_RW): New tokens. - (section): Add sect_constraint. Pass additional argument - to lang_enter_output_section_statement. - * mri.c (mri_draw_tree): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/pe.em (place_orphan): Likewise. - (output_prev_sec_find): Disregard output section statements with - constraint == -1. - * emultempl/mmo.em (output_prev_sec_find): Likewise. - (mmo_place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * emultempl/elf32.em (output_prev_sec_find): Disregard output section - statements with constraint == -1. - (place_orphan): Pass additional argument to - lang_enter_output_section_statement. - * ldlang.c (lang_enter_overlay_section): Likewise. - (lang_output_section_find_1): New. - (lang_output_section_find): Use it. - (lang_output_section_statement_lookup_1): New. - (lang_output_section_statement_lookup): Use it. - (check_section_callback, check_input_sections): New. - (map_input_to_output_sections): Check if all input sections - are readonly if ONLY_IF_RO or ONLY_IF_RW was seen. - (strip_excluded_output_sections): Disregard output section statements - with constraint == -1. - (lang_record_phdrs): Likewise. - (lang_enter_output_section_statement): Add constraint argument. - Use lang_output_section_statement_lookup_1. - * ldlang.h (lang_output_section_statement_type): Add constraint - and all_input_readonly fields. - (lang_enter_output_section_statement): Adjust prototype. - * ldlex.l (ONLY_IF_RO, ONLY_IF_RW): New tokens. - * scripttempl/elf.sc (.eh_frame, .gcc_except_table): Move into text - segment if all input sections are readonly. - ---- ld/emultempl/mmo.em.jj Wed Jul 23 11:08:12 2003 -+++ ld/emultempl/mmo.em Fri Sep 19 17:30:02 2003 -@@ -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); - ---- ld/emultempl/pe.em.jj Thu Aug 21 11:28:48 2003 -+++ ld/emultempl/pe.em Fri Sep 19 17:30:02 2003 -@@ -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); - ---- ld/emultempl/elf32.em.jj Thu Aug 21 11:28:48 2003 -+++ ld/emultempl/elf32.em Fri Sep 19 17:30:02 2003 -@@ -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); - ---- ld/scripttempl/elf.sc.jj Wed Jul 23 11:08:12 2003 -+++ ld/scripttempl/elf.sc Fri Sep 19 17:30:02 2003 -@@ -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}} ---- ld/ldgram.y.jj Thu Aug 21 11:28:48 2003 -+++ ld/ldgram.y Fri Sep 19 17:38:10 2003 -@@ -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 - {} ---- ld/mri.c.jj Wed Jul 23 11:08:12 2003 -+++ ld/mri.c Fri Sep 19 17:30:02 2003 -@@ -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; ---- ld/ldlang.h.jj Thu Aug 21 11:28:48 2003 -+++ ld/ldlang.h Fri Sep 19 17:30:02 2003 -@@ -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 ---- ld/ldlang.c.jj Thu Aug 21 11:28:48 2003 -+++ ld/ldlang.c Fri Sep 19 17:40:21 2003 -@@ -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 ---- ld/ldlex.l.jj Thu Aug 21 11:28:48 2003 -+++ ld/ldlex.l Fri Sep 19 17:30:02 2003 -@@ -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 --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 deleted file mode 100644 index ec6660a6393e..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch +++ /dev/null @@ -1,398 +0,0 @@ -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/2.14/binutils-2.14.90.0.6-hppa-static.diff b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-hppa-static.diff deleted file mode 100644 index 54781022db27..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-hppa-static.diff +++ /dev/null @@ -1,88 +0,0 @@ -Index: bfd/elf32-hppa.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-hppa.c,v -retrieving revision 1.104 -diff -u -p -r1.104 elf32-hppa.c ---- bfd/elf32-hppa.c 21 Aug 2003 14:00:05 -0000 1.104 -+++ bfd/elf32-hppa.c 27 Aug 2003 06:58:29 -0000 -@@ -3126,10 +3126,12 @@ final_link_relocate (asection *input_sec - bfd_vma value, - struct elf32_hppa_link_hash_table *htab, - asection *sym_sec, -- struct elf32_hppa_link_hash_entry *h) -+ struct elf32_hppa_link_hash_entry *h, -+ struct bfd_link_info *info) - { - int insn; - unsigned int r_type = ELF32_R_TYPE (rel->r_info); -+ unsigned int orig_r_type = r_type; - reloc_howto_type *howto = elf_hppa_howto_table + r_type; - int r_format = howto->bitsize; - enum hppa_reloc_field_selector_type_alt r_field; -@@ -3152,6 +3154,25 @@ final_link_relocate (asection *input_sec - input_section->output_offset + - input_section->output_section->vma); - -+ /* If we are linking statically, convert DLT relocs to DPREL relocs */ -+ if (info->static_link) -+ { -+ switch (r_type) -+ { -+ case R_PARISC_DLTIND21L: -+ r_type = R_PARISC_DPREL21L; -+ break; -+ -+ case R_PARISC_DLTIND14R: -+ r_type = R_PARISC_DPREL14R; -+ break; -+ -+ case R_PARISC_DLTIND14F: -+ r_type = R_PARISC_DPREL14F; -+ break; -+ } -+ } -+ - switch (r_type) - { - case R_PARISC_PCREL12F: -@@ -3373,6 +3394,16 @@ final_link_relocate (asection *input_sec - break; - } - -+ if (info->static_link) -+ { -+ if (orig_r_type == R_PARISC_DLTIND21L) -+ { -+ /* addil LR'0(%dp),%r1 */ -+ insn = 0x2b600000; -+ } -+ /* don't have to touch the RHS */ -+ } -+ - insn = hppa_rebuild_insn (insn, val, r_format); - - /* Update the instruction word. */ -@@ -3806,7 +3837,7 @@ elf32_hppa_relocate_section (bfd *output - } - - r = final_link_relocate (input_section, contents, rel, relocation, -- htab, sym_sec, h); -+ htab, sym_sec, h, info); - - if (r == bfd_reloc_ok) - continue; -Index: ld/lexsup.c -=================================================================== -RCS file: /cvs/src/src/ld/lexsup.c,v -retrieving revision 1.66 -diff -u -p -r1.66 lexsup.c ---- ld/lexsup.c 20 Aug 2003 08:37:15 -0000 1.66 -+++ ld/lexsup.c 27 Aug 2003 06:58:31 -0000 -@@ -675,6 +675,7 @@ parse_args (unsigned argc, char **argv) - link_info.unresolved_syms_in_objects = how_to_report_unresolved_symbols; - if (link_info.unresolved_syms_in_shared_libs == RM_NOT_YET_SET) - link_info.unresolved_syms_in_shared_libs = how_to_report_unresolved_symbols; -+ link_info.static_link = TRUE; - break; - case OPTION_CREF: - command_line.cref = TRUE; diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-howto.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-howto.patch deleted file mode 100644 index bee66b64da38..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-howto.patch +++ /dev/null @@ -1,37 +0,0 @@ -2003-09-30 Jakub Jelinek <jakub@redhat.com> - - * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB, - R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB. - ---- bfd/elfxx-ia64.c.jj 2003-09-30 16:44:32.000000000 +0200 -+++ bfd/elfxx-ia64.c 2003-09-30 17:53:11.000000000 +0200 -@@ -446,21 +446,21 @@ static reloc_howto_type ia64_howto_table - IA64_HOWTO (R_IA64_TPREL14, "TPREL14", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL22, "TPREL22", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL64I, "TPREL64I", 0, FALSE, FALSE), -- IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 8, FALSE, FALSE), -- IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 8, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 4, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, FALSE, FALSE), - -- IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 8, FALSE, FALSE), -- IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 8, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPMOD64MSB, "TPREL64MSB", 4, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPMOD64LSB, "TPREL64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, FALSE, FALSE), - - IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL22, "DTPREL22", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL64I, "DTPREL64I", 0, FALSE, FALSE), -- IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 4, FALSE, FALSE), -- IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 4, FALSE, FALSE), -- IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 8, FALSE, FALSE), -- IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 8, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 2, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 2, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 4, FALSE, FALSE), -+ IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_DTPREL22, "LTOFF_DTPREL22", 0, FALSE, FALSE), - }; - diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-sdata.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-sdata.patch deleted file mode 100644 index 55a8f67fa72d..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-sdata.patch +++ /dev/null @@ -1,33 +0,0 @@ -2003-09-10 H.J. Lu <hongjiu.lu@intel.com> - - * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections - started with ".sbss" or "".sdata" as SHF_IA_64_SHORT. - -2003-08-22 H.J. Lu <hongjiu.lu@intel.com> - - * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the - .got section at 8 bytes. - ---- bfd/elfxx-ia64.c 20 Aug 2003 08:37:18 -0000 1.98 -+++ bfd/elfxx-ia64.c 10 Sep 2003 20:48:32 -0000 1.100 -@@ -1781,6 +1781,8 @@ elfNN_ia64_create_dynamic_sections (abfd - { - flagword flags = bfd_get_section_flags (abfd, ia64_info->got_sec); - bfd_set_section_flags (abfd, ia64_info->got_sec, SEC_SMALL_DATA | flags); -+ /* The .got section is always aligned at 8 bytes. */ -+ bfd_set_section_alignment (abfd, ia64_info->got_sec, 3); - } - - if (!get_pltoff (abfd, info, ia64_info)) -@@ -4746,9 +4748,9 @@ elfNN_ia64_reloc_type_class (rela) - - static struct bfd_elf_special_section const elfNN_ia64_special_sections[]= - { -- { ".sbss", 0, NULL, 0, -+ { ".sbss", 5, NULL, 0, - SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, -- { ".sdata", 0, NULL, 0, -+ { ".sdata", 6, NULL, 0, - SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, - { NULL, 0, NULL, 0, - 0, 0 } diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-speedup.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-speedup.patch deleted file mode 100644 index d93f6e98c351..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ia64-speedup.patch +++ /dev/null @@ -1,314 +0,0 @@ -2003-09-11 Jakub Jelinek <jakub@redhat.com> - - * elfxx-ia64.c: Include objalloc.h, hashtab.h. - (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym - fields. - (struct elfNN_ia64_local_hash_table): Remove. - (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type - to htab_t. Add loc_hash_memory field. - (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry): - Removed. - (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New - functions. - (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for - loc_hash_table. Initialize loc_hash_memory. - (elfNN_ia64_hash_table_free): New function. - (elfNN_ia64_local_hash_lookup): Remove. - (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse - callback. - (elfNN_ia64_dyn_sym_traverse): Use htab_traverse. - (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table. - (bfd_elfNN_bfd_link_hash_table_free): Define. - ---- bfd/elfxx-ia64.c.jj 2003-09-18 05:30:39.000000000 -0400 -+++ bfd/elfxx-ia64.c 2003-09-18 07:37:36.000000000 -0400 -@@ -24,6 +24,8 @@ - #include "elf-bfd.h" - #include "opcode/ia64.h" - #include "elf/ia64.h" -+#include "objalloc.h" -+#include "hashtab.h" - - /* THE RULES for all the stuff the linker creates -- - -@@ -115,7 +117,8 @@ struct elfNN_ia64_dyn_sym_info - - struct elfNN_ia64_local_hash_entry - { -- struct bfd_hash_entry root; -+ int id; -+ unsigned int r_sym; - struct elfNN_ia64_dyn_sym_info *info; - - /* TRUE if this hash entry's addends was translated for -@@ -123,12 +126,6 @@ struct elfNN_ia64_local_hash_entry - unsigned sec_merge_done : 1; - }; - --struct elfNN_ia64_local_hash_table --{ -- struct bfd_hash_table root; -- /* No additional fields for now. */ --}; -- - struct elfNN_ia64_link_hash_entry - { - struct elf_link_hash_entry root; -@@ -153,7 +150,8 @@ struct elfNN_ia64_link_hash_table - unsigned self_dtpmod_done : 1;/* has self DTPMOD entry been finished? */ - bfd_vma self_dtpmod_offset; /* .got offset to self DTPMOD entry */ - -- struct elfNN_ia64_local_hash_table loc_hash_table; -+ htab_t loc_hash_table; -+ void *loc_hash_memory; - }; - - struct elfNN_ia64_allocate_data -@@ -201,12 +199,6 @@ static bfd_boolean elfNN_ia64_is_local_l - PARAMS ((bfd *abfd, const char *name)); - static bfd_boolean elfNN_ia64_dynamic_symbol_p - PARAMS ((struct elf_link_hash_entry *h, struct bfd_link_info *info, int)); --static bfd_boolean elfNN_ia64_local_hash_table_init -- PARAMS ((struct elfNN_ia64_local_hash_table *ht, bfd *abfd, -- new_hash_entry_func new)); --static struct bfd_hash_entry *elfNN_ia64_new_loc_hash_entry -- PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table, -- const char *string)); - static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry - PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table, - const char *string)); -@@ -215,15 +207,17 @@ static void elfNN_ia64_hash_copy_indirec - struct elf_link_hash_entry *)); - static void elfNN_ia64_hash_hide_symbol - PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean)); -+static hashval_t elfNN_ia64_local_htab_hash PARAMS ((const void *)); -+static int elfNN_ia64_local_htab_eq PARAMS ((const void *ptr1, -+ const void *ptr2)); - static struct bfd_link_hash_table *elfNN_ia64_hash_table_create - PARAMS ((bfd *abfd)); --static struct elfNN_ia64_local_hash_entry *elfNN_ia64_local_hash_lookup -- PARAMS ((struct elfNN_ia64_local_hash_table *table, const char *string, -- bfd_boolean create, bfd_boolean copy)); -+static void elfNN_ia64_hash_table_free -+ PARAMS ((struct bfd_link_hash_table *hash)); - static bfd_boolean elfNN_ia64_global_dyn_sym_thunk - PARAMS ((struct bfd_hash_entry *, PTR)); --static bfd_boolean elfNN_ia64_local_dyn_sym_thunk -- PARAMS ((struct bfd_hash_entry *, PTR)); -+static int elfNN_ia64_local_dyn_sym_thunk -+ PARAMS ((void **, PTR)); - static void elfNN_ia64_dyn_sym_traverse - PARAMS ((struct elfNN_ia64_link_hash_table *ia64_info, - bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, PTR), -@@ -1520,44 +1514,6 @@ elfNN_ia64_dynamic_symbol_p (h, info, r_ - return _bfd_elf_dynamic_symbol_p (h, info, ignore_protected); - } - --static bfd_boolean --elfNN_ia64_local_hash_table_init (ht, abfd, new) -- struct elfNN_ia64_local_hash_table *ht; -- bfd *abfd ATTRIBUTE_UNUSED; -- new_hash_entry_func new; --{ -- memset (ht, 0, sizeof (*ht)); -- return bfd_hash_table_init (&ht->root, new); --} -- --static struct bfd_hash_entry* --elfNN_ia64_new_loc_hash_entry (entry, table, string) -- struct bfd_hash_entry *entry; -- struct bfd_hash_table *table; -- const char *string; --{ -- struct elfNN_ia64_local_hash_entry *ret; -- ret = (struct elfNN_ia64_local_hash_entry *) entry; -- -- /* Allocate the structure if it has not already been allocated by a -- subclass. */ -- if (!ret) -- ret = bfd_hash_allocate (table, sizeof (*ret)); -- -- if (!ret) -- return 0; -- -- /* Initialize our local data. All zeros, and definitely easier -- than setting a handful of bit fields. */ -- memset (ret, 0, sizeof (*ret)); -- -- /* Call the allocation method of the superclass. */ -- ret = ((struct elfNN_ia64_local_hash_entry *) -- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string)); -- -- return (struct bfd_hash_entry *) ret; --} -- - static struct bfd_hash_entry* - elfNN_ia64_new_elf_hash_entry (entry, table, string) - struct bfd_hash_entry *entry; -@@ -1657,6 +1613,33 @@ elfNN_ia64_hash_hide_symbol (info, xh, f - } - } - -+/* Compute a hash of a local hash entry. */ -+ -+static hashval_t -+elfNN_ia64_local_htab_hash (ptr) -+ const void *ptr; -+{ -+ struct elfNN_ia64_local_hash_entry *entry -+ = (struct elfNN_ia64_local_hash_entry *) ptr; -+ -+ return (((entry->id & 0xff) << 24) | ((entry->id & 0xff00) << 8)) -+ ^ entry->r_sym ^ (entry->id >> 16); -+} -+ -+/* Compare local hash entries. */ -+ -+static int -+elfNN_ia64_local_htab_eq (ptr1, ptr2) -+ const void *ptr1, *ptr2; -+{ -+ struct elfNN_ia64_local_hash_entry *entry1 -+ = (struct elfNN_ia64_local_hash_entry *) ptr1; -+ struct elfNN_ia64_local_hash_entry *entry2 -+ = (struct elfNN_ia64_local_hash_entry *) ptr2; -+ -+ return entry1->id == entry2->id && entry1->r_sym == entry2->r_sym; -+} -+ - /* Create the derived linker hash table. The IA-64 ELF port uses this - derived hash table to keep information specific to the IA-64 ElF - linker (without using static variables). */ -@@ -1678,8 +1661,10 @@ elfNN_ia64_hash_table_create (abfd) - return 0; - } - -- if (!elfNN_ia64_local_hash_table_init (&ret->loc_hash_table, abfd, -- elfNN_ia64_new_loc_hash_entry)) -+ ret->loc_hash_table = htab_try_create (1024, elfNN_ia64_local_htab_hash, -+ elfNN_ia64_local_htab_eq, NULL); -+ ret->loc_hash_memory = objalloc_create (); -+ if (!ret->loc_hash_table || !ret->loc_hash_memory) - { - free (ret); - return 0; -@@ -1688,16 +1673,19 @@ elfNN_ia64_hash_table_create (abfd) - return &ret->root.root; - } - --/* Look up an entry in a Alpha ELF linker hash table. */ -+/* Destroy IA-64 linker hash table. */ - --static INLINE struct elfNN_ia64_local_hash_entry * --elfNN_ia64_local_hash_lookup(table, string, create, copy) -- struct elfNN_ia64_local_hash_table *table; -- const char *string; -- bfd_boolean create, copy; -+static void -+elfNN_ia64_hash_table_free (hash) -+ struct bfd_link_hash_table *hash; - { -- return ((struct elfNN_ia64_local_hash_entry *) -- bfd_hash_lookup (&table->root, string, create, copy)); -+ struct elfNN_ia64_link_hash_table *ia64_info -+ = (struct elfNN_ia64_link_hash_table *) hash; -+ if (ia64_info->loc_hash_table) -+ htab_delete (ia64_info->loc_hash_table); -+ if (ia64_info->loc_hash_memory) -+ objalloc_free ((struct objalloc *) ia64_info->loc_hash_memory); -+ _bfd_generic_link_hash_table_free (hash); - } - - /* Traverse both local and global hash tables. */ -@@ -1729,20 +1717,20 @@ elfNN_ia64_global_dyn_sym_thunk (xentry, - } - - static bfd_boolean --elfNN_ia64_local_dyn_sym_thunk (xentry, xdata) -- struct bfd_hash_entry *xentry; -+elfNN_ia64_local_dyn_sym_thunk (slot, xdata) -+ void **slot; - PTR xdata; - { - struct elfNN_ia64_local_hash_entry *entry -- = (struct elfNN_ia64_local_hash_entry *) xentry; -+ = (struct elfNN_ia64_local_hash_entry *) *slot; - struct elfNN_ia64_dyn_sym_traverse_data *data - = (struct elfNN_ia64_dyn_sym_traverse_data *) xdata; - struct elfNN_ia64_dyn_sym_info *dyn_i; - - for (dyn_i = entry->info; dyn_i; dyn_i = dyn_i->next) - if (! (*data->func) (dyn_i, data->data)) -- return FALSE; -- return TRUE; -+ return 0; -+ return 1; - } - - static void -@@ -1758,8 +1746,8 @@ elfNN_ia64_dyn_sym_traverse (ia64_info, - - elf_link_hash_traverse (&ia64_info->root, - elfNN_ia64_global_dyn_sym_thunk, &xdata); -- bfd_hash_traverse (&ia64_info->loc_hash_table.root, -- elfNN_ia64_local_dyn_sym_thunk, &xdata); -+ htab_traverse (ia64_info->loc_hash_table, -+ elfNN_ia64_local_dyn_sym_thunk, &xdata); - } - - static bfd_boolean -@@ -1819,22 +1807,33 @@ get_local_sym_hash (ia64_info, abfd, rel - const Elf_Internal_Rela *rel; - bfd_boolean create; - { -- struct elfNN_ia64_local_hash_entry *ret; -+ struct elfNN_ia64_local_hash_entry e, *ret; - asection *sec = abfd->sections; -- char addr_name [34]; -+ hashval_t h = (((sec->id & 0xff) << 24) | ((sec->id & 0xff00) << 8)) -+ ^ ELFNN_R_SYM (rel->r_info) ^ (sec->id >> 16); -+ void **slot; -+ -+ e.id = sec->id; -+ e.r_sym = ELFNN_R_SYM (rel->r_info); -+ slot = htab_find_slot_with_hash (ia64_info->loc_hash_table, &e, h, -+ create ? INSERT : NO_INSERT); - -- BFD_ASSERT ((sizeof (sec->id)*2 + 1 + sizeof (unsigned long)*2 + 1) <= 34); -- BFD_ASSERT (sec); -- -- /* Construct a string for use in the elfNN_ia64_local_hash_table. -- name describes what was once anonymous memory. */ -+ if (!slot) -+ return NULL; - -- sprintf (addr_name, "%x:%lx", -- sec->id, (unsigned long) ELFNN_R_SYM (rel->r_info)); -+ if (*slot) -+ return (struct elfNN_ia64_local_hash_entry *) *slot; - -- /* Collect the canonical entry data for this address. */ -- ret = elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table, -- addr_name, create, create); -+ ret = (struct elfNN_ia64_local_hash_entry *) -+ objalloc_alloc ((struct objalloc *) ia64_info->loc_hash_memory, -+ sizeof (struct elfNN_ia64_local_hash_entry)); -+ if (ret) -+ { -+ memset (ret, 0, sizeof (*ret)); -+ ret->id = sec->id; -+ ret->r_sym = ELFNN_R_SYM (rel->r_info); -+ *slot = ret; -+ } - return ret; - } - -@@ -4823,6 +4822,8 @@ elfNN_hpux_backend_section_from_bfd_sect - /* Stuff for the BFD linker: */ - #define bfd_elfNN_bfd_link_hash_table_create \ - elfNN_ia64_hash_table_create -+#define bfd_elfNN_bfd_link_hash_table_free \ -+ elfNN_ia64_hash_table_free - #define elf_backend_create_dynamic_sections \ - elfNN_ia64_create_dynamic_sections - #define elf_backend_check_relocs \ diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-merge-speedup.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-merge-speedup.patch deleted file mode 100644 index 671538cd05b8..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-merge-speedup.patch +++ /dev/null @@ -1,740 +0,0 @@ -2003-09-10 Lars Knoll <lars@trolltech.com> - Michael Matz <matz@suse.de> - Alan Modra <amodra@bigpond.net.au> - Jakub Jelinek <jakub@redhat.com> - - * merge.c (struct elf_strtab_hash_entry): Make len signed. - Remove u.next field. - (cmplengthentry, last4_eq, last_eq): Delete. - (strrevcmp, strrevcmp_align, is_suffix): New. - (merge_strings): Use them to implement fast suffix merging. - * elf-strtab.c (cmplengthentry, last4_eq): Delete. - (strrevcmp, is_suffix): New. - (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging. - - * ld-elf/merge2.s: New test. - * ld-elf/merge2.d: New. - ---- bfd/elf-strtab.c.jj 2002-12-16 15:22:51.000000000 -0500 -+++ bfd/elf-strtab.c 2003-09-18 07:24:00.000000000 -0400 -@@ -1,5 +1,5 @@ - /* ELF strtab with GC and suffix merging support. -- Copyright 2001, 2002 Free Software Foundation, Inc. -+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc. - Written by Jakub Jelinek <jakub@redhat.com>. - - This file is part of BFD, the Binary File Descriptor library. -@@ -30,15 +30,14 @@ - struct elf_strtab_hash_entry - { - struct bfd_hash_entry root; -- /* Length of this entry. */ -- unsigned int len; -+ /* Length of this entry. This includes the zero terminator. */ -+ int len; - unsigned int refcount; - union { - /* Index within the merged section. */ - bfd_size_type index; -- /* Entry this is a suffix of (if len is 0). */ -+ /* Entry this is a suffix of (if len < 0). */ - struct elf_strtab_hash_entry *suffix; -- struct elf_strtab_hash_entry *next; - } u; - }; - -@@ -158,6 +157,8 @@ _bfd_elf_strtab_add (struct elf_strtab_h - if (entry->len == 0) - { - entry->len = strlen (str) + 1; -+ /* 2G strings lose. */ -+ BFD_ASSERT (entry->len > 0); - if (tab->size == tab->alloced) - { - bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *); -@@ -235,14 +236,14 @@ _bfd_elf_strtab_emit (register bfd *abfd - for (i = 1; i < tab->size; ++i) - { - register const char *str; -- register size_t len; -+ register unsigned int len; - -- str = tab->array[i]->root.string; -- len = tab->array[i]->len; - BFD_ASSERT (tab->array[i]->refcount == 0); -- if (len == 0) -+ len = tab->array[i]->len; -+ if ((int) len < 0) - continue; - -+ str = tab->array[i]->root.string; - if (bfd_bwrite (str, len, abfd) != len) - return FALSE; - -@@ -256,37 +257,38 @@ _bfd_elf_strtab_emit (register bfd *abfd - /* Compare two elf_strtab_hash_entry structures. This is called via qsort. */ - - static int --cmplengthentry (const void *a, const void *b) -+strrevcmp (const void *a, const void *b) - { - struct elf_strtab_hash_entry *A = *(struct elf_strtab_hash_entry **) a; - struct elf_strtab_hash_entry *B = *(struct elf_strtab_hash_entry **) b; -+ unsigned int lenA = A->len; -+ unsigned int lenB = B->len; -+ const unsigned char *s = A->root.string + lenA - 1; -+ const unsigned char *t = B->root.string + lenB - 1; -+ int l = lenA < lenB ? lenA : lenB; - -- if (A->len < B->len) -- return 1; -- else if (A->len > B->len) -- return -1; -- -- return memcmp (A->root.string, B->root.string, A->len); -+ while (l) -+ { -+ if (*s != *t) -+ return (int) *s - (int) *t; -+ s--; -+ t--; -+ l--; -+ } -+ return lenA - lenB; - } - - static int --last4_eq (const void *a, const void *b) -+is_suffix (const struct elf_strtab_hash_entry *A, -+ const struct elf_strtab_hash_entry *B) - { -- const struct elf_strtab_hash_entry *A = a; -- const struct elf_strtab_hash_entry *B = b; -- -- if (memcmp (A->root.string + A->len - 5, B->root.string + B->len - 5, 4) -- != 0) -- /* This was a hashtable collision. */ -- return 0; -- - if (A->len <= B->len) - /* B cannot be a suffix of A unless A is equal to B, which is guaranteed - not to be equal by the hash table. */ - return 0; - - return memcmp (A->root.string + (A->len - B->len), -- B->root.string, B->len - 5) == 0; -+ B->root.string, B->len - 1) == 0; - } - - /* This function assigns final string table offsets for used strings, -@@ -295,10 +297,8 @@ last4_eq (const void *a, const void *b) - void - _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab) - { -- struct elf_strtab_hash_entry **array, **a, **end, *e; -- htab_t last4tab = NULL; -+ struct elf_strtab_hash_entry **array, **a, *e; - bfd_size_type size, amt; -- struct elf_strtab_hash_entry *last[256], **last_ptr[256]; - - /* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is - a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd. -@@ -306,105 +306,71 @@ _bfd_elf_strtab_finalize (struct elf_str - cycles. */ - size_t i; - -- /* Now sort the strings by length, longest first. */ -- array = NULL; -+ /* Sort the strings by suffix and length. */ - amt = tab->size * sizeof (struct elf_strtab_hash_entry *); - array = bfd_malloc (amt); - if (array == NULL) - goto alloc_failure; - -- memset (last, 0, sizeof (last)); -- for (i = 0; i < 256; ++i) -- last_ptr[i] = &last[i]; - for (i = 1, a = array; i < tab->size; ++i) -- if (tab->array[i]->refcount) -- *a++ = tab->array[i]; -- else -- tab->array[i]->len = 0; -+ { -+ e = tab->array[i]; -+ if (e->refcount) -+ { -+ *a++ = e; -+ /* Adjust the length to not include the zero terminator. */ -+ e->len -= 1; -+ } -+ else -+ e->len = 0; -+ } - - size = a - array; -+ if (size != 0) -+ { -+ qsort (array, size, sizeof (struct elf_strtab_hash_entry *), strrevcmp); - -- qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry); -+ /* Loop over the sorted array and merge suffixes. Start from the -+ end because we want eg. - -- last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free); -- if (last4tab == NULL) -- goto alloc_failure; -+ s1 -> "d" -+ s2 -> "bcd" -+ s3 -> "abcd" - -- /* Now insert the strings into hash tables (strings with last 4 characters -- and strings with last character equal), look for longer strings which -- we're suffix of. */ -- for (a = array, end = array + size; a < end; a++) -- { -- register hashval_t hash; -- unsigned int c; -- unsigned int j; -- const unsigned char *s; -- void **p; -+ to end up as - -- e = *a; -- if (e->len > 4) -- { -- s = e->root.string + e->len - 1; -- hash = 0; -- for (j = 0; j < 4; j++) -- { -- c = *--s; -- hash += c + (c << 17); -- hash ^= hash >> 2; -- } -- p = htab_find_slot_with_hash (last4tab, e, hash, INSERT); -- if (p == NULL) -- goto alloc_failure; -- if (*p) -- { -- struct elf_strtab_hash_entry *ent; -+ s3 -> "abcd" -+ s2 _____^ -+ s1 _______^ - -- ent = *p; -- e->u.suffix = ent; -- e->len = 0; -- continue; -- } -- else -- *p = e; -- } -- else -+ ie. we don't want s1 pointing into the old s2. */ -+ e = *--a; -+ e->len += 1; -+ while (--a >= array) - { -- struct elf_strtab_hash_entry *tem; -+ struct elf_strtab_hash_entry *cmp = *a; - -- c = e->root.string[e->len - 2] & 0xff; -- -- for (tem = last[c]; tem; tem = tem->u.next) -- if (tem->len > e->len -- && memcmp (tem->root.string + (tem->len - e->len), -- e->root.string, e->len - 1) == 0) -- break; -- if (tem) -+ cmp->len += 1; -+ if (is_suffix (e, cmp)) - { -- e->u.suffix = tem; -- e->len = 0; -- continue; -+ cmp->u.suffix = e; -+ cmp->len = -cmp->len; - } -+ else -+ e = cmp; - } -- -- c = e->root.string[e->len - 2] & 0xff; -- /* Put longest strings first. */ -- *last_ptr[c] = e; -- last_ptr[c] = &e->u.next; -- e->u.next = NULL; - } - - alloc_failure: - if (array) - free (array); -- if (last4tab) -- htab_delete (last4tab); - -- /* Now assign positions to the strings we want to keep. */ -+ /* Assign positions to the strings we want to keep. */ - size = 1; - for (i = 1; i < tab->size; ++i) - { - e = tab->array[i]; -- if (e->refcount && e->len) -+ if (e->refcount && e->len > 0) - { - e->u.index = size; - size += e->len; -@@ -413,12 +379,11 @@ alloc_failure: - - tab->sec_size = size; - -- /* And now adjust the rest. */ -+ /* Adjust the rest. */ - for (i = 1; i < tab->size; ++i) - { - e = tab->array[i]; -- if (e->refcount && ! e->len) -- e->u.index = e->u.suffix->u.index -- + (e->u.suffix->len - strlen (e->root.string) - 1); -+ if (e->refcount && e->len < 0) -+ e->u.index = e->u.suffix->u.index + (e->u.suffix->len + e->len); - } - } ---- bfd/merge.c.jj 2002-12-16 15:22:52.000000000 -0500 -+++ bfd/merge.c 2003-09-18 07:24:32.000000000 -0400 -@@ -1,5 +1,5 @@ - /* SEC_MERGE support. -- Copyright 2001, 2002 Free Software Foundation, Inc. -+ Copyright 2001, 2002, 2003 Free Software Foundation, Inc. - Written by Jakub Jelinek <jakub@redhat.com>. - - This file is part of BFD, the Binary File Descriptor library. -@@ -34,7 +34,7 @@ struct sec_merge_sec_info; - struct sec_merge_hash_entry - { - struct bfd_hash_entry root; -- /* Length of this entry. */ -+ /* Length of this entry. This includes the zero terminator. */ - unsigned int len; - /* Start of this string needs to be aligned to - alignment octets (not 1 << align). */ -@@ -43,8 +43,6 @@ struct sec_merge_hash_entry - { - /* Index within the merged section. */ - bfd_size_type index; -- /* Entity size (if present in suffix hash tables). */ -- unsigned int entsize; - /* Entry this is a suffix of (if alignment is 0). */ - struct sec_merge_hash_entry *suffix; - } u; -@@ -108,12 +106,10 @@ static struct sec_merge_hash_entry *sec_ - struct sec_merge_sec_info *)); - static bfd_boolean sec_merge_emit - PARAMS ((bfd *, struct sec_merge_hash_entry *)); --static int cmplengthentry -- PARAMS ((const PTR, const PTR)); --static int last4_eq -- PARAMS ((const PTR, const PTR)); --static int last_eq -- PARAMS ((const PTR, const PTR)); -+static int strrevcmp PARAMS ((const PTR, const PTR)); -+static int strrevcmp_align PARAMS ((const PTR, const PTR)); -+static int is_suffix PARAMS ((const struct sec_merge_hash_entry *, -+ const struct sec_merge_hash_entry *)); - static bfd_boolean record_section - PARAMS ((struct sec_merge_info *, struct sec_merge_sec_info *)); - static void merge_strings -@@ -231,9 +227,12 @@ sec_merge_hash_lookup (table, string, al - alignment, we need to insert another copy. */ - if (hashp->alignment < alignment) - { -- /* Mark the less aligned copy as deleted. */ -- hashp->len = 0; -- hashp->alignment = 0; -+ if (create) -+ { -+ /* Mark the less aligned copy as deleted. */ -+ hashp->len = 0; -+ hashp->alignment = 0; -+ } - break; - } - return hashp; -@@ -457,85 +456,6 @@ _bfd_merge_section (abfd, psinfo, sec, p - return FALSE; - } - --/* Compare two sec_merge_hash_entry structures. This is called via qsort. */ -- --static int --cmplengthentry (a, b) -- const PTR a; -- const PTR b; --{ -- struct sec_merge_hash_entry * A = *(struct sec_merge_hash_entry **) a; -- struct sec_merge_hash_entry * B = *(struct sec_merge_hash_entry **) b; -- -- if (A->len < B->len) -- return 1; -- else if (A->len > B->len) -- return -1; -- -- return memcmp (A->root.string, B->root.string, A->len); --} -- --static int --last4_eq (a, b) -- const PTR a; -- const PTR b; --{ -- struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a; -- struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b; -- -- if (memcmp (A->root.string + A->len - 5 * A->u.entsize, -- B->root.string + B->len - 5 * A->u.entsize, -- 4 * A->u.entsize) != 0) -- /* This was a hashtable collision. */ -- return 0; -- -- if (A->len <= B->len) -- /* B cannot be a suffix of A unless A is equal to B, which is guaranteed -- not to be equal by the hash table. */ -- return 0; -- -- if (A->alignment < B->alignment -- || ((A->len - B->len) & (B->alignment - 1))) -- /* The suffix is not sufficiently aligned. */ -- return 0; -- -- return memcmp (A->root.string + (A->len - B->len), -- B->root.string, B->len - 5 * A->u.entsize) == 0; --} -- --static int --last_eq (a, b) -- const PTR a; -- const PTR b; --{ -- struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a; -- struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b; -- -- if (B->len >= 5 * A->u.entsize) -- /* Longer strings are just pushed into the hash table, -- they'll be used when looking up for very short strings. */ -- return 0; -- -- if (memcmp (A->root.string + A->len - 2 * A->u.entsize, -- B->root.string + B->len - 2 * A->u.entsize, -- A->u.entsize) != 0) -- /* This was a hashtable collision. */ -- return 0; -- -- if (A->len <= B->len) -- /* B cannot be a suffix of A unless A is equal to B, which is guaranteed -- not to be equal by the hash table. */ -- return 0; -- -- if (A->alignment < B->alignment -- || ((A->len - B->len) & (B->alignment - 1))) -- /* The suffix is not sufficiently aligned. */ -- return 0; -- -- return memcmp (A->root.string + (A->len - B->len), -- B->root.string, B->len - 2 * A->u.entsize) == 0; --} -- - /* Record one section into the hash table. */ - static bfd_boolean - record_section (sinfo, secinfo) -@@ -620,19 +540,89 @@ error_return: - return FALSE; - } - -+static int -+strrevcmp (a, b) -+ const PTR a; -+ const PTR b; -+{ -+ struct sec_merge_hash_entry *A = *(struct sec_merge_hash_entry **) a; -+ struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b; -+ int lenA = A->len; -+ int lenB = B->len; -+ const unsigned char *s = A->root.string + lenA - 1; -+ const unsigned char *t = B->root.string + lenB - 1; -+ int l = lenA < lenB ? lenA : lenB; -+ -+ while (l) -+ { -+ if (*s != *t) -+ return (int) *s - (int) *t; -+ s--; -+ t--; -+ l--; -+ } -+ return lenA - lenB; -+} -+ -+/* Like strrevcmp, but for the case where all strings have the same -+ alignment > entsize. */ -+ -+static int -+strrevcmp_align (a, b) -+ const PTR a; -+ const PTR b; -+{ -+ struct sec_merge_hash_entry *A = *(struct sec_merge_hash_entry **) a; -+ struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b; -+ int lenA = A->len; -+ int lenB = B->len; -+ const unsigned char *s = A->root.string + lenA - 1; -+ const unsigned char *t = B->root.string + lenB - 1; -+ int l = lenA < lenB ? lenA : lenB; -+ -+ if ((lenA & (A->alignment - 1)) < (lenB & (A->alignment - 1))) -+ return -1; -+ if ((lenA & (A->alignment - 1)) > (lenB & (A->alignment - 1))) -+ return 1; -+ -+ while (l) -+ { -+ if (*s != *t) -+ return (int) *s - (int) *t; -+ s--; -+ t--; -+ l--; -+ } -+ return lenA - lenB; -+} -+ -+static INLINE int -+is_suffix (A, B) -+ const struct sec_merge_hash_entry *A; -+ const struct sec_merge_hash_entry *B; -+{ -+ if (A->len <= B->len) -+ /* B cannot be a suffix of A unless A is equal to B, which is guaranteed -+ not to be equal by the hash table. */ -+ return 0; -+ -+ return memcmp (A->root.string + (A->len - B->len), -+ B->root.string, B->len) == 0; -+} -+ - /* This is a helper function for _bfd_merge_sections. It attempts to - merge strings matching suffixes of longer strings. */ - static void - merge_strings (sinfo) - struct sec_merge_info *sinfo; - { -- struct sec_merge_hash_entry **array, **a, **end, *e; -+ struct sec_merge_hash_entry **array, **a, *e; - struct sec_merge_sec_info *secinfo; -- htab_t lasttab = NULL, last4tab = NULL; - bfd_size_type size, amt; -+ unsigned int alignment = 0; -+ bfd_boolean equal_align = TRUE; - -- /* Now sort the strings by length, longest first. */ -- array = NULL; -+ /* Now sort the strings */ - amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *); - array = (struct sec_merge_hash_entry **) bfd_malloc (amt); - if (array == NULL) -@@ -640,90 +630,47 @@ merge_strings (sinfo) - - for (e = sinfo->htab->first, a = array; e; e = e->next) - if (e->alignment) -- *a++ = e; -+ { -+ *a++ = e; -+ /* Adjust the length to not include the zero terminator. */ -+ e->len -= sinfo->htab->entsize; -+ if (!alignment) -+ alignment = e->alignment; -+ else if (alignment != e->alignment) -+ equal_align = FALSE; -+ } - - sinfo->htab->size = a - array; -- -- qsort (array, (size_t) sinfo->htab->size, -- sizeof (struct sec_merge_hash_entry *), cmplengthentry); -- -- last4tab = htab_create_alloc ((size_t) sinfo->htab->size * 4, -- NULL, last4_eq, NULL, calloc, free); -- lasttab = htab_create_alloc ((size_t) sinfo->htab->size * 4, -- NULL, last_eq, NULL, calloc, free); -- if (lasttab == NULL || last4tab == NULL) -- goto alloc_failure; -- -- /* Now insert the strings into hash tables (strings with last 4 characters -- and strings with last character equal), look for longer strings which -- we're suffix of. */ -- for (a = array, end = array + sinfo->htab->size; a < end; a++) -- { -- register hashval_t hash; -- unsigned int c; -- unsigned int i; -- const unsigned char *s; -- PTR *p; -- -- e = *a; -- e->u.entsize = sinfo->htab->entsize; -- if (e->len <= e->u.entsize) -- break; -- if (e->len > 4 * e->u.entsize) -- { -- s = (const unsigned char *) (e->root.string + e->len - e->u.entsize); -- hash = 0; -- for (i = 0; i < 4 * e->u.entsize; i++) -- { -- c = *--s; -- hash += c + (c << 17); -- hash ^= hash >> 2; -- } -- p = htab_find_slot_with_hash (last4tab, e, hash, INSERT); -- if (p == NULL) -- goto alloc_failure; -- if (*p) -+ if (sinfo->htab->size != 0) -+ { -+ qsort (array, (size_t) sinfo->htab->size, -+ sizeof (struct sec_merge_hash_entry *), -+ (equal_align && alignment > sinfo->htab->entsize) -+ ? strrevcmp_align : strrevcmp); -+ -+ /* Loop over the sorted array and merge suffixes */ -+ e = *--a; -+ e->len += sinfo->htab->entsize; -+ while (--a >= array) -+ { -+ struct sec_merge_hash_entry *cmp = *a; -+ -+ cmp->len += sinfo->htab->entsize; -+ if (e->alignment >= cmp->alignment -+ && !((e->len - cmp->len) & (cmp->alignment - 1)) -+ && is_suffix (e, cmp)) - { -- struct sec_merge_hash_entry *ent; -- -- ent = (struct sec_merge_hash_entry *) *p; -- e->u.suffix = ent; -- e->alignment = 0; -- continue; -+ cmp->u.suffix = e; -+ cmp->alignment = 0; - } - else -- *p = (PTR) e; -- } -- s = (const unsigned char *) (e->root.string + e->len - e->u.entsize); -- hash = 0; -- for (i = 0; i < e->u.entsize; i++) -- { -- c = *--s; -- hash += c + (c << 17); -- hash ^= hash >> 2; -- } -- p = htab_find_slot_with_hash (lasttab, e, hash, INSERT); -- if (p == NULL) -- goto alloc_failure; -- if (*p) -- { -- struct sec_merge_hash_entry *ent; -- -- ent = (struct sec_merge_hash_entry *) *p; -- e->u.suffix = ent; -- e->alignment = 0; -+ e = cmp; - } -- else -- *p = (PTR) e; - } - - alloc_failure: - if (array) - free (array); -- if (lasttab) -- htab_delete (lasttab); -- if (last4tab) -- htab_delete (last4tab); - - /* Now assign positions to the strings we want to keep. */ - size = 0; ---- ld/testsuite/ld-elf/merge2.d.jj 2003-09-18 05:44:07.000000000 -0400 -+++ ld/testsuite/ld-elf/merge2.d 2003-09-18 05:44:07.000000000 -0400 -@@ -0,0 +1,15 @@ -+#source: merge2.s -+#ld: -T merge.ld -+#objdump: -s -+ -+.*: file format .*elf.* -+ -+Contents of section .text: -+ 1000 (3010)?0000(1030)? (3210)?0000(1032)? (3110)?0000(1031)? (3410)?0000(1034)? .* -+ 1010 (4010)?0000(1040)? (3810)?0000(1038)? (4810)?0000(1048)? (3c10)?0000(103c)? .* -+ 1020 (5010)?0000(1050)? (5410)?0000(1054)? (5810)?0000(1058)? (5010)?0000(1050)? .* -+Contents of section .rodata: -+ 1030 61626300 62000000 (78563412|12345678) 99999999 .* -+ 1040 (78563412|12345678) 00000000 99999999 00000000 .* -+ 1050 (78563412|12345678) 99999999 00000000 .* -+#pass ---- ld/testsuite/ld-elf/merge2.s.jj 2003-09-18 05:44:07.000000000 -0400 -+++ ld/testsuite/ld-elf/merge2.s 2003-09-18 05:44:07.000000000 -0400 -@@ -0,0 +1,58 @@ -+ .section .rodata.str,"aMS","progbits",1 -+.LC0: -+ .asciz "abc" -+.LC1: -+ .asciz "c" -+.LC2: -+ .asciz "bc" -+.LC3: -+ .asciz "b" -+ -+ -+ .section .rodata.str2,"aMS","progbits",4 -+ .p2align 2 -+.LC4: -+ .long 0x12345678 -+ .long 0 -+.LC5: -+ .long 0x12345678 -+ .long 0x99999999 -+ .long 0x12345678 -+ .long 0 -+.LC6: -+ .long 0x99999999 -+ .long 0 -+.LC7: -+ .long 0x99999999 -+ .long 0x12345678 -+ .long 0 -+ -+ -+ .section .rodata.m,"aM","progbits",4 -+ .p2align 2 -+.LC8: -+ .long 0x12345678 -+.LC9: -+ .long 0x99999999 -+.LC10: -+ .long 0 -+.LC11: -+ .long 0x12345678 -+ -+ -+ .text -+ .global _start -+_start: -+ .long .LC0 -+.LT0: -+ .long .LC1 -+ .long .LC2 -+ .long .LC3 -+ .long .LC4 -+ .long .LC5 -+ .long .LC6 -+ .long .LC7 -+ .long .LC8 -+ .long .LC9 -+ .long .LC10 -+ .long .LC11 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 deleted file mode 100644 index 0a9589c31856..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-ppc-bfd.patch +++ /dev/null @@ -1,834 +0,0 @@ -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/2.14/binutils-2.14.90.0.6-sparc-cfi.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-sparc-cfi.patch deleted file mode 100644 index 94342cc65633..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-sparc-cfi.patch +++ /dev/null @@ -1,367 +0,0 @@ -2003-08-29 Jakub Jelinek <jakub@redhat.com> - - * dw2gencfi.c (cfi_pseudo_table): Add cfi_window_save. - (dot_cfi, output_cfi_insn): Handle DW_CFA_GNU_window_save. - (output_cie): Don't use DW_EH_PE_pcrel if neither DIFF_EXPR_OK - nor tc_cfi_emit_pcrel_expr are defined. - (output_fde): Use tc_cfi_emit_pcrel_expr if available and - DIFF_EXPR_OK is not defined. - * config/tc-sparc.h (TARGET_USE_CFIPOP): Define. - (tc_cfi_frame_initial_instructions, tc_regname_to_dw2regnum, - tc_cfi_emit_pcrel_expr): Define. - (sparc_cfi_frame_initial_instructions, sparc_regname_to_dw2regnum, - sparc_cfi_emit_pcrel_expr): New prototypes. - (sparc_cie_data_alignment): New decl. - (DWARF2_DEFAULT_RETURN_COLUMN, DWARF2_CIE_DATA_ALIGNMENT): Define. - * config/tc-sparc.c: Include dw2gencfi.h. - (sparc_cie_data_alignment): New variable. - (md_begin): Initialize it. - (sparc_cfi_frame_initial_instructions): New function. - (sparc_regname_to_dw2regnum): Likewise. - (sparc_cfi_emit_pcrel_expr): Likewise. - * doc/as.texinfo: Document .cfi_window_save. - - * config/tc-sparc.c (s_common): Cast last argument to long and - change format string to shut up warning. -testsuite/ - * gas/cfi/cfi-sparc-1.s: New test. - * gas/cfi/cfi-sparc-1.d: New test. - * gas/cfi/cfi-sparc64-1.s: New test. - * gas/cfi/cfi-sparc64-1.d: New test. - * gas/cfi/cfi.exp: Run them. - ---- gas/dw2gencfi.c.jj 2003-06-18 13:57:59.000000000 -0400 -+++ gas/dw2gencfi.c 2003-08-29 14:00:41.000000000 -0400 -@@ -374,6 +374,7 @@ const pseudo_typeS cfi_pseudo_table[] = - { "cfi_same_value", dot_cfi, DW_CFA_same_value }, - { "cfi_remember_state", dot_cfi, DW_CFA_remember_state }, - { "cfi_restore_state", dot_cfi, DW_CFA_restore_state }, -+ { "cfi_window_save", dot_cfi, DW_CFA_GNU_window_save }, - { "cfi_escape", dot_cfi_escape, 0 }, - { NULL, NULL, 0 } - }; -@@ -529,6 +530,10 @@ dot_cfi (int arg) - cfi_add_CFA_restore_state (); - break; - -+ case DW_CFA_GNU_window_save: -+ cfi_add_CFA_insn (DW_CFA_GNU_window_save); -+ break; -+ - default: - abort (); - } -@@ -798,6 +803,10 @@ output_cfi_insn (struct cfi_insn_data *i - out_one (insn->insn); - break; - -+ case DW_CFA_GNU_window_save: -+ out_one (DW_CFA_GNU_window_save); -+ break; -+ - case CFI_escape: - { - struct cfi_escape_data *e; -@@ -838,7 +847,11 @@ output_cie (struct cie_entry *cie) - out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment */ - out_one (cie->return_column); /* Return column */ - out_uleb128 (1); /* Augmentation size */ -+#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr - out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4); -+#else -+ out_one (DW_EH_PE_sdata4); -+#endif - - if (cie->first) - for (i = cie->first; i != cie->last; i = i->next) -@@ -867,10 +880,22 @@ output_fde (struct fde_entry *fde, struc - exp.X_add_symbol = after_size_address; - exp.X_op_symbol = cie->start_address; - emit_expr (&exp, 4); /* CIE offset */ -- -+ -+#ifdef DIFF_EXPR_OK - exp.X_add_symbol = fde->start_address; - exp.X_op_symbol = symbol_temp_new_now (); - emit_expr (&exp, 4); /* Code offset */ -+#else -+ exp.X_op = O_symbol; -+ exp.X_add_symbol = fde->start_address; -+ exp.X_op_symbol = NULL; -+#ifdef tc_cfi_emit_pcrel_expr -+ tc_cfi_emit_pcrel_expr (&exp, 4); /* Code offset */ -+#else -+ emit_expr (&exp, 4); /* Code offset */ -+#endif -+ exp.X_op = O_subtract; -+#endif - - exp.X_add_symbol = fde->end_address; - exp.X_op_symbol = fde->start_address; /* Code length */ ---- gas/config/tc-sparc.h.jj 2003-01-24 18:37:51.000000000 -0500 -+++ gas/config/tc-sparc.h 2003-08-29 15:38:47.000000000 -0400 -@@ -174,6 +174,21 @@ extern void cons_fix_new_sparc - } \ - while (0) - --#define DWARF2_LINE_MIN_INSN_LENGTH 4 -+#define TARGET_USE_CFIPOP 1 -+ -+#define tc_cfi_frame_initial_instructions sparc_cfi_frame_initial_instructions -+extern void sparc_cfi_frame_initial_instructions PARAMS ((void)); -+ -+#define tc_regname_to_dw2regnum sparc_regname_to_dw2regnum -+extern int sparc_regname_to_dw2regnum PARAMS ((const char *regname)); -+ -+#define tc_cfi_emit_pcrel_expr sparc_cfi_emit_pcrel_expr -+extern void sparc_cfi_emit_pcrel_expr PARAMS ((expressionS *, unsigned int)); -+ -+extern int sparc_cie_data_alignment; -+ -+#define DWARF2_LINE_MIN_INSN_LENGTH 4 -+#define DWARF2_DEFAULT_RETURN_COLUMN 15 -+#define DWARF2_CIE_DATA_ALIGNMENT sparc_cie_data_alignment - - /* end of tc-sparc.h */ ---- gas/config/tc-sparc.c.jj 2003-07-02 11:01:56.000000000 -0400 -+++ gas/config/tc-sparc.c 2003-08-29 15:39:10.000000000 -0400 -@@ -26,6 +26,7 @@ - #include "subsegs.h" - - #include "opcode/sparc.h" -+#include "dw2gencfi.h" - - #ifdef OBJ_ELF - #include "elf/sparc.h" -@@ -116,6 +117,9 @@ static int target_little_endian_data; - /* Symbols for global registers on v9. */ - static symbolS *globals[8]; - -+/* The dwarf2 data alignment, adjusted for 32 or 64 bit. */ -+int sparc_cie_data_alignment; -+ - /* V9 and 86x have big and little endian data, but instructions are always big - endian. The sparclet has bi-endian support but both data and insns have - the same endianness. Global `target_big_endian' is used for data. -@@ -798,6 +802,7 @@ md_begin () - if (! default_init_p) - init_default_arch (); - -+ sparc_cie_data_alignment = sparc_arch_size == 64 ? -8 : -4; - op_hash = hash_new (); - - while (i < (unsigned int) sparc_num_opcodes) -@@ -3804,8 +3809,8 @@ s_common (ignore) - { - if (S_GET_VALUE (symbolP) != (valueT) size) - { -- as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %d."), -- S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), size); -+ as_warn (_("Length of .comm \"%s\" is already %ld. Not changed to %ld."), -+ S_GET_NAME (symbolP), (long) S_GET_VALUE (symbolP), (long) size); - } - } - else -@@ -4482,4 +4487,63 @@ cons_fix_new_sparc (frag, where, nbytes, - } - - fix_new_exp (frag, where, (int) nbytes, exp, 0, r); -+ sparc_cons_special_reloc = NULL; -+} -+ -+void -+sparc_cfi_frame_initial_instructions () -+{ -+ cfi_add_CFA_def_cfa (14, sparc_arch_size == 64 ? 0x7ff : 0); -+} -+ -+int -+sparc_regname_to_dw2regnum (const char *regname) -+{ -+ char *p, *q; -+ -+ if (!regname[0]) -+ return -1; -+ -+ q = "goli"; -+ p = strchr (q, regname[0]); -+ if (p) -+ { -+ if (regname[1] < '0' || regname[1] > '8' || regname[2]) -+ return -1; -+ return (p - q) * 8 + regname[1] - '0'; -+ } -+ if (regname[0] == 's' && regname[1] == 'p' && !regname[2]) -+ return 14; -+ if (regname[0] == 'f' && regname[1] == 'p' && !regname[2]) -+ return 30; -+ if (regname[0] == 'f' || regname[0] == 'r') -+ { -+ unsigned int regnum; -+ -+ regnum = strtoul (regname + 1, &q, 10); -+ if (p == q || *q) -+ return -1; -+ if (regnum >= ((regname[0] == 'f' -+ && SPARC_OPCODE_ARCH_V9_P (max_architecture)) -+ ? 64 : 32)) -+ return -1; -+ if (regname[0] == 'f') -+ { -+ regnum += 32; -+ if (regnum >= 64 && (regnum & 1)) -+ return -1; -+ } -+ return regnum; -+ } -+ return -1; -+} -+ -+void -+sparc_cfi_emit_pcrel_expr (expressionS *exp, unsigned int nbytes) -+{ -+ sparc_cons_special_reloc = "disp"; -+ sparc_no_align_cons = 1; -+ emit_expr (exp, nbytes); -+ sparc_no_align_cons = 0; -+ sparc_cons_special_reloc = NULL; - } ---- gas/doc/as.texinfo.jj 2003-07-29 05:40:36.000000000 -0400 -+++ gas/doc/as.texinfo 2003-08-29 15:29:21.000000000 -0400 -@@ -4050,6 +4050,9 @@ using the known displacement of the CFA - This is often easier to use, because the number will match the - code it's annotating. - -+@section @code{.cfi_window_save} -+SPARC register window has been saved. -+ - @section @code{.cfi_escape} @var{expression}[, @dots{}] - Allows the user to add arbitrary bytes to the unwind info. One - might use this to add OS-specific CFI opcodes, or generic CFI ---- gas/testsuite/gas/cfi/cfi-sparc-1.s.jj 2003-08-28 05:56:33.000000000 -0400 -+++ gas/testsuite/gas/cfi/cfi-sparc-1.s 2003-08-28 06:26:37.000000000 -0400 -@@ -0,0 +1,23 @@ -+#; $ as -o test.o -32 gas-cfi-test.s && gcc -m32 -nostdlib -o test test.o -+ -+ .file "a.c" -+ .text -+ .align 4 -+ .globl foo -+ .type foo, @function -+foo: -+ .cfi_startproc -+ save %sp, -104, %sp -+ .cfi_def_cfa_register %fp -+ .cfi_window_save -+ .cfi_register %o7, %i7 -+ add %i0, 1, %o0 -+ call bar, 0 -+ add %i0, 2, %i0 -+ call bar, 0 -+ mov %i0, %o0 -+ add %o0, 3, %o0 -+ ret -+ restore %g0, %o0, %o0 -+ .cfi_endproc -+ .size foo, .-foo ---- gas/testsuite/gas/cfi/cfi-sparc64-1.s.jj 2003-08-28 05:56:33.000000000 -0400 -+++ gas/testsuite/gas/cfi/cfi-sparc64-1.s 2003-08-28 06:26:44.000000000 -0400 -@@ -0,0 +1,26 @@ -+#; $ as -o test.o -64 gas-cfi-test.s && gcc -m64 -nostdlib -o test test.o -+ -+ .file "a.c" -+ .text -+ .align 4 -+ .globl foo -+ .type foo, @function -+foo: -+ .cfi_startproc -+ save %sp, -192, %sp -+ .cfi_def_cfa_register %fp -+ .cfi_window_save -+ .cfi_register %o7, %i7 -+ add %i0, 1, %o0 -+ add %i0, 2, %i0 -+ call bar, 0 -+ sra %o0, 0, %o0 -+ sra %i0, 0, %i0 -+ call bar, 0 -+ mov %i0, %o0 -+ add %o0, 3, %o0 -+ sra %o0, 0, %o0 -+ ret -+ restore %g0, %o0, %o0 -+ .cfi_endproc -+ .size foo, .-foo ---- gas/testsuite/gas/cfi/cfi-sparc-1.d.jj 2003-08-29 15:17:54.000000000 -0400 -+++ gas/testsuite/gas/cfi/cfi-sparc-1.d 2003-08-29 15:17:44.000000000 -0400 -@@ -0,0 +1,22 @@ -+#readelf: -wf -+#name: CFI on SPARC 32-bit -+#as: -32 -+ -+The section .eh_frame contains: -+ -+00000000 00000010 00000000 CIE -+ Version: 1 -+ Augmentation: "zR" -+ Code alignment factor: 4 -+ Data alignment factor: -4 -+ Return address column: 15 -+ Augmentation data: 1b -+ -+ DW_CFA_def_cfa: r14 ofs 0 -+ -+00000014 00000014 00000018 FDE cie=00000000 pc=0000001c..00000040 -+ DW_CFA_advance_loc: 4 to 00000020 -+ DW_CFA_def_cfa_reg: r30 -+ DW_CFA_GNU_window_save -+ DW_CFA_register: r15 in r31 -+ ---- gas/testsuite/gas/cfi/cfi-sparc64-1.d.jj 2003-08-29 15:17:51.000000000 -0400 -+++ gas/testsuite/gas/cfi/cfi-sparc64-1.d 2003-08-29 15:17:35.000000000 -0400 -@@ -0,0 +1,25 @@ -+#readelf: -wf -+#name: CFI on SPARC 64-bit -+#as: -64 -+ -+The section .eh_frame contains: -+ -+00000000 00000011 00000000 CIE -+ Version: 1 -+ Augmentation: "zR" -+ Code alignment factor: 4 -+ Data alignment factor: -8 -+ Return address column: 15 -+ Augmentation data: 1b -+ -+ DW_CFA_def_cfa: r14 ofs 2047 -+ -+00000015 00000017 00000019 FDE cie=00000000 pc=0000001d..0000004d -+ DW_CFA_advance_loc: 4 to 00000021 -+ DW_CFA_def_cfa_reg: r30 -+ DW_CFA_GNU_window_save -+ DW_CFA_register: r15 in r31 -+ DW_CFA_nop -+ DW_CFA_nop -+ DW_CFA_nop -+ ---- gas/testsuite/gas/cfi/cfi.exp.jj 2003-08-10 15:56:11.000000000 -0400 -+++ gas/testsuite/gas/cfi/cfi.exp 2003-08-29 15:23:29.000000000 -0400 -@@ -39,6 +39,16 @@ if [istarget "x86_64-*"] then { - } elseif { [istarget "m68*-*"] } then { - run_dump_test "cfi-m68k" - -+} elseif { [istarget sparc*-*-*] } then { -+ global NM -+ global NMFLAGS -+ global srcdir -+ -+ catch "exec $srcdir/lib/run $NM $NMFLAGS --help" nm_help -+ run_dump_test "cfi-sparc-1" -+ if { [regexp "elf64\[_-\]sparc" $nm_help] } then { -+ run_dump_test "cfi-sparc64-1" -+ } - } else { - return - } diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch deleted file mode 100644 index 7b98ac88757d..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- bfd/elf.c.orig 2004-01-14 05:11:43.000000000 -0500 -+++ bfd/elf.c 2004-01-14 05:18:51.000000000 -0500 -@@ -4648,8 +4648,9 @@ - 2. It is an allocated segment, - 3. There is an output section associated with it, - 4. The section has not already been allocated to a previous segment. -- 5. PT_TLS segment includes only SHF_TLS sections. -- 6. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */ -+ 5. PT_GNU_STACK segments do not include any sections. -+ 6. PT_TLS segment includes only SHF_TLS sections. -+ 7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */ - #define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \ - ((((segment->p_paddr \ - ? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \ -@@ -4657,6 +4659,7 @@ - && (section->flags & SEC_ALLOC) != 0) \ - || IS_COREFILE_NOTE (segment, section)) \ - && section->output_section != NULL \ -+ && segment->p_type != PT_GNU_STACK \ - && (segment->p_type != PT_TLS \ - || (section->flags & SEC_THREAD_LOCAL)) \ - && (segment->p_type == PT_LOAD \ diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch deleted file mode 100644 index f73d979b2117..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-ppc-reloc.patch +++ /dev/null @@ -1,1251 +0,0 @@ -From: Alan Modra <amodra at bigpond dot net dot au> - -bfd/ChangeLog - * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return - updated section in case of merged section. - * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration. - * elf-hppa.h (elf_hppa_relocate_section): Adjust call. - * elf-m10200.c (mn10200_elf_relocate_section): Likewise. - * elf-m10300.c (mn10300_elf_relocate_section): Likewise. - * elf32-arm.h (elf32_arm_relocate_section): Likewise. - * elf32-avr.c (elf32_avr_relocate_section): Likewise. - * elf32-cris.c (cris_elf_relocate_section): Likewise. - * elf32-fr30.c (fr30_elf_relocate_section): Likewise. - * elf32-frv.c (elf32_frv_relocate_section): Likewise. - * elf32-h8300.c (elf32_h8_relocate_section): Likewise. - * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. - * elf32-i370.c (i370_elf_relocate_section): Likewise. - * elf32-i860.c (elf32_i860_relocate_section): Likewise. - * elf32-m32r.c (m32r_elf_relocate_section): Likewise. - * elf32-m68k.c (elf_m68k_relocate_section): Likewise. - * elf32-mcore.c (mcore_elf_relocate_section): Likewise. - * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. - * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. - * elf32-ppc.c (ppc_elf_relocate_section): Likewise. - * elf32-s390.c (elf_s390_relocate_section): Likewise. - * elf32-sh.c (sh_elf_relocate_section): Likewise. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - * elf32-v850.c (v850_elf_relocate_section) Likewise. - * elf32-vax.c (elf_vax_relocate_section): Likewise. - * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. - * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. - * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. - * elf64-mmix.c (mmix_elf_relocate_section): Likewise. - * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. - * elf64-s390.c (elf_s390_relocate_section): Likewise. - * elf64-sh64.c (sh_elf64_relocate_section): Likewise. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. - * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. - - * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol - section for reloc output. - * elf32-i370.c (i370_elf_relocate_section): Likewise. - * elf32-m68k.c (elf_m68k_relocate_section): Likewise. - * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. - * elf32-vax.c (elf_vax_relocate_section): Likewise. - * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. - * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. - - * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything - for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value - return value. - * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check - sec->id. - - * elf/ppc.h (R_PPC_RELAX32PC): Define. - - * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC. - (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate - cases. - (shared_stub_entry): Correct opcode. - (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs. - (ppc_elf_relocate_section): Handle them. - - * elf32-ppc.c (ppc_elf_install_value): Delete. - (shared_stub_entry, stub_entry): Make them arrays of ints. - Remove initial branch. - (ppc_elf_relax_section): Write one branch around all trampolines - instead. Correct bogus R_PPC_PLTREL24 handling. Correct - branch range check. Only use shared_stub_entry when shared. - Test that branches can reach stubs. Write trampolines out at - end so that just one realloc is used. Handle little-endian - mode. Move relevant code from ppc_elf_install_value to here. - (ppc_elf_relocate_section): Move code handling RELAX32 from - ppc_elf_install_value to here. - -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf-bfd.h binutils-2.14.90.0.7/bfd/elf-bfd.h ---- binutils-2.14.90.0.7.orig/bfd/elf-bfd.h 2003-11-07 00:11:22.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf-bfd.h 2003-11-07 00:21:15.000000000 +0100 -@@ -1303,7 +1303,7 @@ - extern enum elf_reloc_type_class _bfd_elf_reloc_type_class - (const Elf_Internal_Rela *); - extern bfd_vma _bfd_elf_rela_local_sym -- (bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *); -+ (bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *); - extern bfd_vma _bfd_elf_rel_local_sym - (bfd *, Elf_Internal_Sym *, asection **, bfd_vma); - extern bfd_vma _bfd_elf_section_offset -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf-hppa.h binutils-2.14.90.0.7/bfd/elf-hppa.h ---- binutils-2.14.90.0.7.orig/bfd/elf-hppa.h 2003-11-07 00:11:17.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf-hppa.h 2003-11-07 00:21:15.000000000 +0100 -@@ -1346,7 +1346,7 @@ - /* This is a local symbol. */ - sym = local_syms + r_symndx; - sym_sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); - - /* If this symbol has an entry in the PA64 dynamic hash - table, then get it. */ -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf-m10200.c binutils-2.14.90.0.7/bfd/elf-m10200.c ---- binutils-2.14.90.0.7.orig/bfd/elf-m10200.c 2003-11-07 00:11:14.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf-m10200.c 2003-11-07 00:21:15.000000000 +0100 -@@ -373,7 +373,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf-m10300.c binutils-2.14.90.0.7/bfd/elf-m10300.c ---- binutils-2.14.90.0.7.orig/bfd/elf-m10300.c 2003-11-07 00:11:15.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf-m10300.c 2003-11-07 00:21:15.000000000 +0100 -@@ -1574,7 +1574,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf.c binutils-2.14.90.0.7/bfd/elf.c ---- binutils-2.14.90.0.7.orig/bfd/elf.c 2003-11-07 00:11:20.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf.c 2003-11-07 00:21:15.000000000 +0100 -@@ -7367,9 +7367,10 @@ - bfd_vma - _bfd_elf_rela_local_sym (bfd *abfd, - Elf_Internal_Sym *sym, -- asection *sec, -+ asection **psec, - Elf_Internal_Rela *rel) - { -+ asection *sec = *psec; - bfd_vma relocation; - - relocation = (sec->output_section->vma -@@ -7379,16 +7380,14 @@ - && ELF_ST_TYPE (sym->st_info) == STT_SECTION - && sec->sec_info_type == ELF_INFO_TYPE_MERGE) - { -- asection *msec; -- -- msec = sec; - rel->r_addend = -- _bfd_merged_section_offset (abfd, &msec, -+ _bfd_merged_section_offset (abfd, psec, - elf_section_data (sec)->sec_info, - sym->st_value + rel->r_addend, -- 0) -- - relocation; -- rel->r_addend += msec->output_section->vma + msec->output_offset; -+ 0); -+ sec = *psec; -+ rel->r_addend -= relocation; -+ rel->r_addend += sec->output_section->vma + sec->output_offset; - } - return relocation; - } -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-arm.h binutils-2.14.90.0.7/bfd/elf32-arm.h ---- binutils-2.14.90.0.7.orig/bfd/elf32-arm.h 2003-11-07 00:11:24.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-arm.h 2003-11-07 00:21:15.000000000 +0100 -@@ -1958,7 +1958,7 @@ - bfd_put_32 (input_bfd, value, contents + rel->r_offset); - } - #else -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - #endif - } - else -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-avr.c binutils-2.14.90.0.7/bfd/elf32-avr.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-avr.c 2003-11-07 00:11:15.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-avr.c 2003-11-07 00:21:15.000000000 +0100 -@@ -750,7 +750,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-cris.c binutils-2.14.90.0.7/bfd/elf32-cris.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-cris.c 2003-11-07 00:11:19.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-cris.c 2003-11-07 00:21:15.000000000 +0100 -@@ -847,7 +847,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - symname = (bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name)); -@@ -1292,16 +1292,7 @@ - { - long indx; - -- if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-fr30.c binutils-2.14.90.0.7/bfd/elf32-fr30.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-fr30.c 2003-11-07 00:11:22.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-fr30.c 2003-11-07 00:21:15.000000000 +0100 -@@ -552,7 +552,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-frv.c binutils-2.14.90.0.7/bfd/elf32-frv.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-frv.c 2003-11-07 00:11:13.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-frv.c 2003-11-07 00:21:15.000000000 +0100 -@@ -724,7 +724,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-h8300.c binutils-2.14.90.0.7/bfd/elf32-h8300.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-h8300.c 2003-11-07 00:11:18.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-h8300.c 2003-11-07 00:21:15.000000000 +0100 -@@ -435,7 +435,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-hppa.c binutils-2.14.90.0.7/bfd/elf32-hppa.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-hppa.c 2003-11-07 00:11:23.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-hppa.c 2003-11-07 00:21:15.000000000 +0100 -@@ -3408,7 +3408,7 @@ - /* This is a local symbol, h defaults to NULL. */ - sym = local_syms + r_symndx; - sym_sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-i370.c binutils-2.14.90.0.7/bfd/elf32-i370.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-i370.c 2003-11-07 00:11:22.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-i370.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1210,7 +1210,7 @@ - sec = local_sections[r_symndx]; - sym_name = "<local symbol>"; - -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - addend = rel->r_addend; - } - else -@@ -1363,16 +1363,7 @@ - { - long indx; - -- if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-i860.c binutils-2.14.90.0.7/bfd/elf32-i860.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-i860.c 2003-11-07 00:11:16.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-i860.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1104,7 +1104,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-m32r.c binutils-2.14.90.0.7/bfd/elf32-m32r.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-m32r.c 2003-11-07 00:11:22.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-m32r.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1107,7 +1107,7 @@ - sec = local_sections[r_symndx]; - sym_name = "<local symbol>"; - #if !USE_REL -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - addend = rel->r_addend; - #else - /* FIXME: This won't handle local relocations against SEC_MERGE -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-m68k.c binutils-2.14.90.0.7/bfd/elf32-m68k.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-m68k.c 2003-11-07 00:11:22.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-m68k.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1403,7 +1403,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -@@ -1657,16 +1657,7 @@ - { - long indx; - -- if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-mcore.c binutils-2.14.90.0.7/bfd/elf32-mcore.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-mcore.c 2003-11-07 00:11:15.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-mcore.c 2003-11-07 00:21:16.000000000 +0100 -@@ -467,7 +467,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - addend = rel->r_addend; - } - else -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-msp430.c binutils-2.14.90.0.7/bfd/elf32-msp430.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-msp430.c 2003-11-07 00:11:24.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-msp430.c 2003-11-07 00:21:16.000000000 +0100 -@@ -449,7 +449,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-openrisc.c binutils-2.14.90.0.7/bfd/elf32-openrisc.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-openrisc.c 2003-11-07 00:11:23.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-openrisc.c 2003-11-07 00:21:16.000000000 +0100 -@@ -375,7 +375,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-ppc.c binutils-2.14.90.0.7/bfd/elf32-ppc.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-ppc.c 2003-11-07 00:11:21.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-ppc.c 2003-11-07 00:27:00.000000000 +0100 -@@ -1534,7 +1534,7 @@ - 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ - -- /* Phony reloc to handle branch stubs. */ -+ /* Phony relocs to handle branch stubs. */ - HOWTO (R_PPC_RELAX32, /* type */ - 0, /* rightshift */ - 0, /* size */ -@@ -1549,6 +1549,20 @@ - 0, /* dst_mask */ - FALSE), /* pcrel_offset */ - -+ HOWTO (R_PPC_RELAX32PC, /* type */ -+ 0, /* rightshift */ -+ 0, /* size */ -+ 0, /* bitsize */ -+ FALSE, /* pc_relative */ -+ 0, /* bitpos */ -+ complain_overflow_dont, /* complain_on_overflow */ -+ bfd_elf_generic_reloc, /* special_function */ -+ "R_PPC_RELAX32PC", /* name */ -+ FALSE, /* partial_inplace */ -+ 0, /* src_mask */ -+ 0, /* dst_mask */ -+ FALSE), /* pcrel_offset */ -+ - /* GNU extension to record C++ vtable hierarchy. */ - HOWTO (R_PPC_GNU_VTINHERIT, /* type */ - 0, /* rightshift */ -@@ -1614,90 +1628,26 @@ - } - } - --static bfd_reloc_status_type --ppc_elf_install_value (bfd *abfd, -- bfd_byte *hit_addr, -- bfd_vma v, -- unsigned int r_type) --{ -- bfd_vma t0, t1; --#ifdef BFD_HOST_U_64_BIT -- BFD_HOST_U_64_BIT val = (BFD_HOST_U_64_BIT) v; --#else -- bfd_vma val = v; --#endif -- -- switch (r_type) -- { -- case R_PPC_RELAX32: -- /* Do stuff here. */ -- t0 = bfd_get_32 (abfd, hit_addr); -- t1 = bfd_get_32 (abfd, hit_addr + 4); -- -- /* We're clearing the bits for R_PPC_ADDR16_HA -- and R_PPC_ADDR16_LO here. */ -- t0 &= ~0xffff; -- t1 &= ~0xffff; -- -- /* t0 is HA, t1 is lo */ -- t0 |= ((val + 0x8000) >> 16) & 0xffff; -- t1 |= val & 0xffff; -- -- bfd_put_32 (abfd, t0, hit_addr); -- bfd_put_32 (abfd, t1, hit_addr + 4); -- break; -- -- case R_PPC_REL24: -- t0 = bfd_get_32 (abfd, hit_addr); -- t0 &= ~0x3fffffc; -- t0 |= val & 0x3fffffc; -- bfd_put_32 (abfd, t0, hit_addr); -- break; -- -- case R_PPC_REL14: -- case R_PPC_REL14_BRTAKEN: -- case R_PPC_REL14_BRNTAKEN: -- t0 = bfd_get_32 (abfd, hit_addr); -- t0 &= ~0xfffc; -- t0 |= val & 0xfffc; -- bfd_put_32 (abfd, t0, hit_addr); -- break; -- -- case R_PPC_LOCAL24PC: -- case R_PPC_PLTREL24: -- t0 = bfd_get_32 (abfd, hit_addr); -- t0 &= ~0x3fffffc; -- t0 |= val & 0x3fffffc; -- bfd_put_32 (abfd, t0, hit_addr); -- break; -- -- default: -- return bfd_reloc_notsupported; -- } -+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) - -- return bfd_reloc_ok; --} -- --static const bfd_byte shared_stub_entry[] = -+static const int shared_stub_entry[] = - { -- 0x48, 0x00, 0x00, 0x24, /* b .+36 */ -- 0x7c, 0x08, 0x02, 0xa6, /* mflr 0 */ -- 0x42, 0x9f, 0x00, 0x05, /* bcl 20, 31, .Lxxx */ -- 0x7d, 0x68, 0x02, 0xa6, /* mflr 11 */ -- 0x3d, 0x60, 0x00, 0x00, /* addis 11, 11, (xxx-.Lxxx)@ha */ -- 0x39, 0x6b, 0x00, 0x18, /* addi 11, 11, (xxx-.Lxxx)@l */ -- 0x7c, 0x08, 0x03, 0xa6, /* mtlr 0 */ -- 0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */ -- 0x4e, 0x80, 0x04, 0x20, /* bctr */ -+ 0x7c0802a6, /* mflr 0 */ -+ 0x429f0005, /* bcl 20, 31, .Lxxx */ -+ 0x7d6802a6, /* mflr 11 */ -+ 0x3d6b0000, /* addis 11, 11, (xxx-.Lxxx)@ha */ -+ 0x396b0018, /* addi 11, 11, (xxx-.Lxxx)@l */ -+ 0x7c0803a6, /* mtlr 0 */ -+ 0x7d6903a6, /* mtctr 11 */ -+ 0x4e800420, /* bctr */ - }; - --static const bfd_byte stub_entry[] = -+static const int stub_entry[] = - { -- 0x48, 0x00, 0x00, 0x14, /* b .+20 */ -- 0x3d, 0x60, 0x00, 0x00, /* lis 11,xxx@ha */ -- 0x39, 0x6b, 0x00, 0x00, /* addi 11,11,xxx@l */ -- 0x7d, 0x69, 0x03, 0xa6, /* mtctr 11 */ -- 0x4e, 0x80, 0x04, 0x20, /* bctr */ -+ 0x3d600000, /* lis 11,xxx@ha */ -+ 0x396b0000, /* addi 11,11,xxx@l */ -+ 0x7d6903a6, /* mtctr 11 */ -+ 0x4e800420, /* bctr */ - }; - - -@@ -1721,9 +1671,9 @@ - Elf_Internal_Rela *internal_relocs = NULL; - Elf_Internal_Rela *irel, *irelend; - struct one_fixup *fixups = NULL; -- bfd_boolean changed_contents = FALSE; -- bfd_boolean changed_relocs = FALSE; -+ bfd_boolean changed; - struct ppc_elf_link_hash_table *ppc_info; -+ bfd_size_type trampoff; - - *again = FALSE; - -@@ -1738,6 +1688,10 @@ - if (isec->_cooked_size == 0) - isec->_cooked_size = isec->_raw_size; - -+ trampoff = (isec->_cooked_size + 3) & (bfd_vma) -4; -+ /* Space for a branch around any trampolines. */ -+ trampoff += 4; -+ - symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - - /* Get a copy of the native relocations. */ -@@ -1767,21 +1721,26 @@ - for (irel = internal_relocs; irel < irelend; irel++) - { - unsigned long r_type = ELF32_R_TYPE (irel->r_info); -- bfd_vma symaddr, reladdr, trampoff, toff, roff; -+ bfd_vma symaddr, reladdr, toff, roff; - asection *tsec; -- bfd_size_type amt; - struct one_fixup *f; - size_t insn_offset = 0; -- bfd_vma max_branch_offset; -+ bfd_vma max_branch_offset, val; -+ bfd_byte *hit_addr; -+ unsigned long t0; - - switch (r_type) - { - case R_PPC_REL24: - case R_PPC_LOCAL24PC: -+ case R_PPC_PLTREL24: -+ max_branch_offset = 1 << 25; -+ break; -+ - case R_PPC_REL14: - case R_PPC_REL14_BRTAKEN: - case R_PPC_REL14_BRNTAKEN: -- case R_PPC_PLTREL24: -+ max_branch_offset = 1 << 15; - break; - - default: -@@ -1819,7 +1778,7 @@ - } - else - { -- /* Need dynamic symbol handling. */ -+ /* Global symbol handling. */ - unsigned long indx; - struct elf_link_hash_entry *h; - -@@ -1830,62 +1789,34 @@ - || h->root.type == bfd_link_hash_warning) - h = (struct elf_link_hash_entry *) h->root.u.i.link; - -- if (r_type == R_PPC_PLTREL24) -+ if (r_type == R_PPC_PLTREL24 -+ && ppc_info->plt != NULL -+ && h->plt.offset != (bfd_vma) -1) - { -- Elf_Internal_Sym *isym; -- -- if (h->plt.offset == (bfd_vma) -1 -- || ppc_info->plt == NULL) -- { -- -- /* Read this BFD's local symbols. */ -- if (isymbuf == NULL) -- { -- isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; -- if (isymbuf == NULL) -- isymbuf = bfd_elf_get_elf_syms (abfd, symtab_hdr, -- symtab_hdr->sh_info, 0, -- NULL, NULL, NULL); -- if (isymbuf == 0) -- goto error_return; -- } -- isym = isymbuf + ELF32_R_SYM (irel->r_info); -- -- if (isym->st_shndx == SHN_UNDEF) -- /* We can't do anthing with undefined symbols. */ -- continue; -- else if (isym->st_shndx == SHN_ABS) -- tsec = bfd_abs_section_ptr; -- else if (isym->st_shndx == SHN_COMMON) -- tsec = bfd_com_section_ptr; -- else -- tsec = h->root.u.def.section; -- -- toff = h->root.u.def.value; -- } -- else -- { -- tsec = ppc_info->plt; -- toff = h->plt.offset; -- } -+ tsec = ppc_info->plt; -+ toff = h->plt.offset; - } -- else if (h->root.type == bfd_link_hash_undefined -- || h->root.type == bfd_link_hash_undefweak) -- continue; -- -- else -+ else if (h->root.type == bfd_link_hash_defined -+ || h->root.type == bfd_link_hash_defweak) - { - tsec = h->root.u.def.section; - toff = h->root.u.def.value; - } -+ else -+ continue; - } - -+ /* If the branch and target are in the same section, you have -+ no hope of adding stubs. We'll error out later should the -+ branch overflow. */ -+ if (tsec == isec) -+ continue; -+ -+ toff += irel->r_addend; - if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE) - toff = _bfd_merged_section_offset (abfd, &tsec, - elf_section_data (tsec)->sec_info, -- toff + irel->r_addend, 0); -- else -- toff += irel->r_addend; -+ toff, 0); - - symaddr = tsec->output_section->vma + tsec->output_offset + toff; - -@@ -1893,22 +1824,10 @@ - - reladdr = (isec->output_section->vma - + isec->output_offset -- + roff) & (bfd_vma) -4; -+ + roff); - - /* If the branch is in range, no need to do anything. */ -- max_branch_offset = 1 << 25; -- if (r_type != R_PPC_REL24 -- && r_type != R_PPC_LOCAL24PC -- && r_type != R_PPC_PLTREL24) -- max_branch_offset = 1 << 15; -- -- if ((bfd_vma) (symaddr - reladdr) + max_branch_offset -- <= 2 * max_branch_offset) -- continue; -- -- /* If the branch and target are in the same section, you have -- no hope. We'll error out later. */ -- if (tsec == isec) -+ if (symaddr - reladdr + max_branch_offset < 2 * max_branch_offset) - continue; - - /* Look for an existing fixup to this address. */ -@@ -1919,40 +1838,31 @@ - if (f == NULL) - { - size_t size; -+ unsigned long stub_rtype; - -- if (link_info->shared -- || tsec == ppc_info->plt -- || r_type == R_PPC_LOCAL24PC) -+ val = trampoff - roff; -+ if (val >= max_branch_offset) -+ /* Oh dear, we can't reach a trampoline. Don't try to add -+ one. We'll report an error later. */ -+ continue; -+ -+ if (link_info->shared) - { -- size = sizeof (shared_stub_entry); -- insn_offset = 16; -+ size = 4 * ARRAY_SIZE (shared_stub_entry); -+ insn_offset = 12; -+ stub_rtype = R_PPC_RELAX32PC; - } - else - { -- size = sizeof (stub_entry); -- insn_offset = 4; -+ size = 4 * ARRAY_SIZE (stub_entry); -+ insn_offset = 0; -+ stub_rtype = R_PPC_RELAX32; - } - -- /* Resize the current section to make room for the new branch. */ -- trampoff = (isec->_cooked_size + 3) & (bfd_vma) - 4; -- amt = trampoff + size; -- contents = bfd_realloc (contents, amt); -- if (contents == NULL) -- abort (); -- -- isec->_cooked_size = amt; -- -- if (link_info->shared -- || tsec == ppc_info->plt -- || r_type == R_PPC_LOCAL24PC) -- memcpy (contents + trampoff, shared_stub_entry, size); -- else -- memcpy (contents + trampoff, stub_entry, size); -- - /* Hijack the old relocation. Since we need two - relocations for this use a "composite" reloc. */ - irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), -- R_PPC_RELAX32); -+ stub_rtype); - irel->r_offset = trampoff + insn_offset; - - /* Record the fixup so we don't do it again this section. */ -@@ -1962,31 +1872,95 @@ - f->toff = toff; - f->trampoff = trampoff; - fixups = f; -+ -+ trampoff += size; - } - else - { -+ val = f->trampoff - roff; -+ if (val >= max_branch_offset) -+ continue; -+ - /* Nop out the reloc, since we're finalizing things here. */ - irel->r_info = ELF32_R_INFO (0, R_PPC_NONE); - } - -- /* Fix up the existing branch to hit the trampoline. Hope like -- hell this doesn't overflow too. */ -- if (ppc_elf_install_value (abfd, contents + roff, -- f->trampoff - (roff & (bfd_vma) -3) + 4, -- r_type) != bfd_reloc_ok) -- abort (); -+ /* Fix up the existing branch to hit the trampoline. */ -+ hit_addr = contents + roff; -+ switch (r_type) -+ { -+ case R_PPC_REL24: -+ case R_PPC_LOCAL24PC: -+ case R_PPC_PLTREL24: -+ t0 = bfd_get_32 (abfd, hit_addr); -+ t0 &= ~0x3fffffc; -+ t0 |= val & 0x3fffffc; -+ bfd_put_32 (abfd, t0, hit_addr); -+ break; - -- changed_contents = TRUE; -- changed_relocs = TRUE; -+ case R_PPC_REL14: -+ case R_PPC_REL14_BRTAKEN: -+ case R_PPC_REL14_BRNTAKEN: -+ t0 = bfd_get_32 (abfd, hit_addr); -+ t0 &= ~0xfffc; -+ t0 |= val & 0xfffc; -+ bfd_put_32 (abfd, t0, hit_addr); -+ break; -+ } - } - -- /* Clean up. */ -- while (fixups) -+ /* Write out the trampolines. */ -+ changed = fixups != NULL; -+ if (fixups != NULL) - { -- struct one_fixup *f = fixups; -- fixups = fixups->next; -- free (f); -+ const int *stub; -+ bfd_byte *dest; -+ bfd_vma val; -+ int i, size; -+ -+ do -+ { -+ struct one_fixup *f = fixups; -+ fixups = fixups->next; -+ free (f); -+ } -+ while (fixups); -+ -+ contents = bfd_realloc (contents, trampoff); -+ if (contents == NULL) -+ goto error_return; -+ -+ isec->_cooked_size = (isec->_cooked_size + 3) & (bfd_vma) -4; -+ /* Branch around the trampolines. */ -+ val = trampoff - isec->_cooked_size + 0x48000000; -+ dest = contents + isec->_cooked_size; -+ isec->_cooked_size = trampoff; -+ bfd_put_32 (abfd, val, dest); -+ dest += 4; -+ -+ if (link_info->shared) -+ { -+ stub = shared_stub_entry; -+ size = ARRAY_SIZE (shared_stub_entry); -+ } -+ else -+ { -+ stub = stub_entry; -+ size = ARRAY_SIZE (stub_entry); -+ } -+ -+ i = 0; -+ while (dest < contents + trampoff) -+ { -+ bfd_put_32 (abfd, stub[i], dest); -+ i++; -+ if (i == size) -+ i = 0; -+ dest += 4; -+ } -+ BFD_ASSERT (i == 0); - } -+ - if (isymbuf != NULL - && symtab_hdr->contents != (unsigned char *) isymbuf) - { -@@ -2002,7 +1976,7 @@ - if (contents != NULL - && elf_section_data (isec)->this_hdr.contents != contents) - { -- if (!changed_contents && !link_info->keep_memory) -+ if (!changed && !link_info->keep_memory) - free (contents); - else - { -@@ -2013,13 +1987,13 @@ - - if (elf_section_data (isec)->relocs != internal_relocs) - { -- if (!changed_relocs) -+ if (!changed) - free (internal_relocs); - else - elf_section_data (isec)->relocs = internal_relocs; - } - -- *again = changed_contents || changed_relocs; -+ *again = changed; - return TRUE; - - error_return: -@@ -4727,7 +4701,7 @@ - sec = local_sections[r_symndx]; - sym_name = bfd_elf_local_sym_name (input_bfd, sym); - -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -@@ -5454,45 +5428,33 @@ - } - break; - -+ case R_PPC_RELAX32PC: -+ relocation -= (input_section->output_section->vma -+ + input_section->output_offset -+ + rel->r_offset - 4); -+ /* Fall thru */ - case R_PPC_RELAX32: - { -- unsigned long r_symndx; -- Elf_Internal_Sym *sym; -- asection *sym_sec; -- bfd_byte *hit_addr = 0; -- bfd_vma value = 0; -+ unsigned long t0; -+ unsigned long t1; - -- r_symndx = ELF32_R_SYM (rel->r_info); -- -- if (r_symndx < symtab_hdr->sh_info) -- { -- sym = local_syms + r_symndx; -- sym_sec = local_sections[r_symndx]; -- -- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); -- } -- else -- { -- bfd_boolean warned; -- bfd_boolean unresolved_reloc; -+ t0 = bfd_get_32 (output_bfd, contents + rel->r_offset); -+ t1 = bfd_get_32 (output_bfd, contents + rel->r_offset + 4); - -- RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd), -- r_symndx, symtab_hdr, -- value, sym_sec, -- unresolved_reloc, info, -- warned); -- if (warned) -- continue; -- } -- hit_addr = contents + rel->r_offset; -- value += rel->r_addend; -+ /* We're clearing the bits for R_PPC_ADDR16_HA -+ and R_PPC_ADDR16_LO here. */ -+ t0 &= ~0xffff; -+ t1 &= ~0xffff; -+ -+ /* t0 is HA, t1 is LO */ -+ relocation += addend; -+ t0 |= ((relocation + 0x8000) >> 16) & 0xffff; -+ t1 |= relocation & 0xffff; - -- r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type); -- if (r != bfd_reloc_ok) -- break; -- else -- continue; -+ bfd_put_32 (output_bfd, t0, contents + rel->r_offset); -+ bfd_put_32 (output_bfd, t1, contents + rel->r_offset + 4); - } -+ continue; - - /* Indirect .sdata relocation. */ - case R_PPC_EMB_SDAI16: -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-s390.c binutils-2.14.90.0.7/bfd/elf32-s390.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-s390.c 2003-11-07 00:11:15.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-s390.c 2003-11-07 00:21:16.000000000 +0100 -@@ -2325,7 +2325,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-sh.c binutils-2.14.90.0.7/bfd/elf32-sh.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-sh.c 2003-11-07 00:11:14.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-sh.c 2003-11-07 00:21:16.000000000 +0100 -@@ -4805,7 +4805,7 @@ - } - else if (! howto->partial_inplace) - { -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - addend = rel->r_addend; - } - else if ((sec->flags & SEC_MERGE) -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-sparc.c binutils-2.14.90.0.7/bfd/elf32-sparc.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-sparc.c 2003-11-07 00:11:25.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-sparc.c 2003-11-07 00:21:16.000000000 +0100 -@@ -2460,16 +2460,8 @@ - - if (is_plt) - sec = htab->splt; -- else if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-v850.c binutils-2.14.90.0.7/bfd/elf32-v850.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-v850.c 2003-11-07 00:11:24.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-v850.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1681,7 +1681,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - #if 0 - { - char * name; -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-vax.c binutils-2.14.90.0.7/bfd/elf32-vax.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-vax.c 2003-11-07 00:11:13.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-vax.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1483,7 +1483,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -@@ -1737,16 +1737,7 @@ - { - long indx; - -- if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-xstormy16.c binutils-2.14.90.0.7/bfd/elf32-xstormy16.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-xstormy16.c 2003-11-07 00:11:15.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-xstormy16.c 2003-11-07 00:21:16.000000000 +0100 -@@ -845,7 +845,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf32-xtensa.c binutils-2.14.90.0.7/bfd/elf32-xtensa.c ---- binutils-2.14.90.0.7.orig/bfd/elf32-xtensa.c 2003-11-07 00:11:17.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf32-xtensa.c 2003-11-07 00:21:16.000000000 +0100 -@@ -2004,7 +2004,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-alpha.c binutils-2.14.90.0.7/bfd/elf64-alpha.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-alpha.c 2003-11-07 00:11:16.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-alpha.c 2003-11-07 00:21:16.000000000 +0100 -@@ -4394,9 +4394,11 @@ - - if (r_symndx < symtab_hdr->sh_info) - { -+ asection *msec; - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ msec = sec; -+ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel); - - /* If this is a tp-relative relocation against sym 0, - this is hackery from relax_section. Force the value to -@@ -4424,7 +4426,6 @@ - && !gotent->reloc_xlated) - { - struct alpha_elf_got_entry *ent; -- asection *msec; - - for (ent = gotent; ent; ent = ent->next) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-mmix.c binutils-2.14.90.0.7/bfd/elf64-mmix.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-mmix.c 2003-11-07 00:11:14.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-mmix.c 2003-11-07 00:21:16.000000000 +0100 -@@ -1472,7 +1472,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections [r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - - name = bfd_elf_string_from_elf_section - (input_bfd, symtab_hdr->sh_link, sym->st_name); -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-ppc.c binutils-2.14.90.0.7/bfd/elf64-ppc.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-ppc.c 2003-11-07 00:11:18.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-ppc.c 2003-11-07 00:21:17.000000000 +0100 -@@ -7385,7 +7385,7 @@ - sec = local_sections[r_symndx]; - sym_name = bfd_elf_local_sym_name (input_bfd, sym); - sym_type = ELF64_ST_TYPE (sym->st_info); -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - if (elf_section_data (sec) != NULL) - { - long *opd_sym_adjust; -@@ -8178,7 +8178,9 @@ - relocation = TOCstart; - if (r_symndx == 0) - relocation += htab->stub_group[input_section->id].toc_off; -- else if (sec != NULL && !unresolved_reloc) -+ else if (unresolved_reloc) -+ ; -+ else if (sec != NULL && sec->id <= htab->top_id) - relocation += htab->stub_group[sec->id].toc_off; - else - unresolved_reloc = TRUE; -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-s390.c binutils-2.14.90.0.7/bfd/elf64-s390.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-s390.c 2003-11-07 00:11:16.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-s390.c 2003-11-07 00:21:17.000000000 +0100 -@@ -2295,7 +2295,7 @@ - { - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-sh64.c binutils-2.14.90.0.7/bfd/elf64-sh64.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-sh64.c 2003-11-07 00:11:21.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-sh64.c 2003-11-07 00:21:17.000000000 +0100 -@@ -1582,7 +1582,7 @@ - } - else if (! howto->partial_inplace) - { -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - relocation |= ((sym->st_other & STO_SH5_ISA32) != 0); - } - else if ((sec->flags & SEC_MERGE) -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-sparc.c binutils-2.14.90.0.7/bfd/elf64-sparc.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-sparc.c 2003-11-07 00:11:24.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-sparc.c 2003-11-07 00:26:02.000000000 +0100 -@@ -2071,7 +2071,7 @@ - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; - orig_addend = rel->r_addend; -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -@@ -2248,16 +2248,8 @@ - - if (is_plt) - sec = splt; -- else if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ -+ if (bfd_is_abs_section (sec)) - indx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elf64-x86-64.c binutils-2.14.90.0.7/bfd/elf64-x86-64.c ---- binutils-2.14.90.0.7.orig/bfd/elf64-x86-64.c 2003-11-07 00:11:23.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elf64-x86-64.c 2003-11-07 00:21:17.000000000 +0100 -@@ -1823,7 +1823,7 @@ - sym = local_syms + r_symndx; - sec = local_sections[r_symndx]; - -- relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel); -+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); - } - else - { -@@ -2048,16 +2048,7 @@ - { - long sindx; - -- if (h == NULL) -- sec = local_sections[r_symndx]; -- else -- { -- BFD_ASSERT (h->root.type == bfd_link_hash_defined -- || (h->root.type -- == bfd_link_hash_defweak)); -- sec = h->root.u.def.section; -- } -- if (sec != NULL && bfd_is_abs_section (sec)) -+ if (bfd_is_abs_section (sec)) - sindx = 0; - else if (sec == NULL || sec->owner == NULL) - { -diff -ruN binutils-2.14.90.0.7.orig/bfd/elfxx-ia64.c binutils-2.14.90.0.7/bfd/elfxx-ia64.c ---- binutils-2.14.90.0.7.orig/bfd/elfxx-ia64.c 2003-11-07 00:11:25.000000000 +0100 -+++ binutils-2.14.90.0.7/bfd/elfxx-ia64.c 2003-11-07 00:21:17.000000000 +0100 -@@ -3848,9 +3848,11 @@ - if (r_symndx < symtab_hdr->sh_info) - { - /* Reloc against local symbol. */ -+ asection *msec; - sym = local_syms + r_symndx; - sym_sec = local_sections[r_symndx]; -- value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel); -+ msec = sym_sec; -+ value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel); - if ((sym_sec->flags & SEC_MERGE) - && ELF_ST_TYPE (sym->st_info) == STT_SECTION - && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE) -@@ -3861,7 +3863,6 @@ - if (loc_h && ! loc_h->sec_merge_done) - { - struct elfNN_ia64_dyn_sym_info *dynent; -- asection *msec; - - for (dynent = loc_h->info; dynent; dynent = dynent->next) - { -diff -ruN binutils-2.14.90.0.7.orig/include/elf/ppc.h binutils-2.14.90.0.7/include/elf/ppc.h ---- binutils-2.14.90.0.7.orig/include/elf/ppc.h 2003-11-07 00:10:33.000000000 +0100 -+++ binutils-2.14.90.0.7/include/elf/ppc.h 2003-11-07 00:26:52.000000000 +0100 -@@ -120,9 +120,10 @@ - RELOC_NUMBER (R_PPC_EMB_BIT_FLD, 115) - RELOC_NUMBER (R_PPC_EMB_RELSDA, 116) - --/* Fake relocation for branch stubs. This will keep them -+/* Fake relocations for branch stubs. This will keep them - together. */ - #define R_PPC_RELAX32 251 -+#define R_PPC_RELAX32PC 252 - - /* These are GNU extensions to enable C++ vtable garbage collection. */ - RELOC_NUMBER (R_PPC_GNU_VTINHERIT, 253) diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch deleted file mode 100644 index b0f7793b78d7..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.7-tls-section-alignment.patch +++ /dev/null @@ -1,1059 +0,0 @@ -From: Alan Modra <amodra at bigpond dot net dot au> -To: binutils at sources dot redhat dot com -Subject: tls section alignment - -This testcase fails to return the expected status on powerpc-linux, -depending on optimization level (really on where .tdata starts, but that -often changes depending on optimization). - -__thread int a = 10; -__thread int b __attribute__ ((aligned (8))); - -int main (void) -{ - return a; -} - -What's happening is that the TLS segment, made up of .tdata and .tbss, -ends up with p_vaddr not a multiple of p_align. Under these -circumstances glibc rounds down the TLS segment start address, which -affects targets that set their thread pointer from the start of a TLS -block. In the powerpc-linux testcase, we end up accessing *(&a-1). - -I started off fixing this just for powerpc and powerpc64, then decided -to teach ld how to ensure that the TLS segment p_vaddr is aligned. - -bfd/ChangeLog - * bfd-in.h (_bfd_elf_tls_setup): Declare. - * bfd-in2.h: Regenerate. - * elf-bfd.h (struct elf_link_tls_segment): Delete. - (struct elf_link_hash_table): Add tls_sec and tls_size. - * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size. - * elflink.c (_bfd_elf_tls_setup): New function. - * elflink.h (struct elf_final_link_info): Remove first_tls_sec. - (elf_bfd_final_link): Don't set first_tls_sec here. Update code - saving tls segment info, round segment size up. - (elf_link_output_extsym): Adjust code using tls segment info. - (elf_link_input_bfd): Likewise. - * elf32-i386.c (dtpoff_base, tpoff): Likewise. - * elf32-s390.c (dtpoff_base, tpoff): Likewise. - * elf32-sh.c (dtpoff_base, tpoff): Likewise. - * elf32-sparc.c (dtpoff_base, tpoff): Likewise. - * elf64-s390.c (dtpoff_base, tpoff): Likewise. - * elf64-x86-64.c (dtpoff_base, tpoff): Likewise. - * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise. - (elfNN_ia64_dtprel_base): Likewise. - * elf64-alpha.c (alpha_get_dtprel_base): Likewise. - (alpha_get_tprel_base): Likewise. - (struct alpha_relax_info): Remove tls_segment. - (elf64_alpha_relax_got_load): Adjust invocation of - alpha_get_dtprel_base and alpha_get_tprel_base. - (elf64_alpha_relax_tls_get_addr): Likewise. - (elf64_alpha_relax_section): Likewise. - (elf64_alpha_relocate_section): Likewise. - (elf64_alpha_relax_find_tls_segment): Delete. - * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec. - (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. - (ppc_elf_relocate_section): Adjust to use elf.tls_sec. - * elf32-ppc.h (ppc_elf_tls_setup): Update. - * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec. - (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section. - (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec. - (ppc64_elf_relocate_section): Likewise. - * elf64-ppc.h (ppc64_elf_tls_setup): Update. - -ld/ChangeLog - * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Call - _bfd_elf_tls_setup. - -Index: bfd/bfd-in.h -=================================================================== -RCS file: /cvs/src/src/bfd/bfd-in.h,v -retrieving revision 1.68 -diff -u -p -r1.68 bfd-in.h ---- bfd/bfd-in.h 31 Oct 2003 05:32:45 -0000 1.68 -+++ bfd/bfd-in.h 4 Nov 2003 05:33:50 -0000 -@@ -677,6 +677,9 @@ extern int bfd_get_arch_size - extern int bfd_get_sign_extend_vma - (bfd *); - -+extern struct bfd_section *_bfd_elf_tls_setup -+ (bfd *, struct bfd_link_info *); -+ - extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs - (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); - extern bfd_boolean bfd_mips_elf32_create_embedded_relocs -Index: bfd/elf-bfd.h -=================================================================== -RCS file: /cvs/src/src/bfd/elf-bfd.h,v -retrieving revision 1.116 -diff -u -p -r1.116 elf-bfd.h ---- bfd/elf-bfd.h 3 Nov 2003 15:17:38 -0000 1.116 -+++ bfd/elf-bfd.h 4 Nov 2003 05:33:53 -0000 -@@ -309,14 +309,6 @@ struct eh_frame_hdr_info - bfd_boolean table; - }; - --/* Cached start, size and alignment of PT_TLS segment. */ --struct elf_link_tls_segment --{ -- bfd_vma start; -- bfd_size_type size; -- unsigned int align; --}; -- - /* ELF linker hash table. */ - - struct elf_link_hash_table -@@ -377,8 +369,9 @@ struct elf_link_hash_table - objects included in the link. */ - struct bfd_link_needed_list *runpath; - -- /* Cached start, size and alignment of PT_TLS segment. */ -- struct elf_link_tls_segment *tls_segment; -+ /* Cached first output tls section and size of PT_TLS segment. */ -+ asection *tls_sec; -+ bfd_size_type tls_size; - - /* A linked list of BFD's loaded in the link. */ - struct elf_link_loaded_list *loaded; -Index: bfd/elf.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf.c,v -retrieving revision 1.205 -diff -u -p -r1.205 elf.c ---- bfd/elf.c 31 Oct 2003 05:32:45 -0000 1.205 -+++ bfd/elf.c 4 Nov 2003 05:34:00 -0000 -@@ -1444,7 +1444,8 @@ _bfd_elf_link_hash_table_init - memset (&table->eh_info, 0, sizeof (table->eh_info)); - table->dynlocal = NULL; - table->runpath = NULL; -- table->tls_segment = NULL; -+ table->tls_sec = NULL; -+ table->tls_size = 0; - table->loaded = NULL; - - ret = _bfd_link_hash_table_init (&table->root, abfd, newfunc); -Index: bfd/elflink.c -=================================================================== -RCS file: /cvs/src/src/bfd/elflink.c,v -retrieving revision 1.48 -diff -u -p -r1.48 elflink.c ---- bfd/elflink.c 30 Oct 2003 14:13:50 -0000 1.48 -+++ bfd/elflink.c 4 Nov 2003 05:34:00 -0000 -@@ -2519,3 +2519,31 @@ _bfd_elf_symbol_refs_local_p (struct elf - dynamic linker will resolve them locally. */ - return local_protected; - } -+ -+/* Caches some TLS segment info, and ensures that the TLS segment vma is -+ aligned. Returns the first TLS output section. */ -+ -+struct bfd_section * -+_bfd_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) -+{ -+ struct bfd_section *sec, *tls; -+ unsigned int align = 0; -+ -+ for (sec = obfd->sections; sec != NULL; sec = sec->next) -+ if ((sec->flags & SEC_THREAD_LOCAL) != 0) -+ break; -+ tls = sec; -+ -+ for (; sec != NULL && (sec->flags & SEC_THREAD_LOCAL) != 0; sec = sec->next) -+ if (sec->alignment_power > align) -+ align = sec->alignment_power; -+ -+ elf_hash_table (info)->tls_sec = tls; -+ -+ /* Ensure the alignment of the first section is the largest alignment, -+ so that the tls segment starts aligned. */ -+ if (tls != NULL) -+ tls->alignment_power = align; -+ -+ return tls; -+} -Index: bfd/elflink.h -=================================================================== -RCS file: /cvs/src/src/bfd/elflink.h,v -retrieving revision 1.245 -diff -u -p -r1.245 elflink.h ---- bfd/elflink.h 24 Oct 2003 14:55:14 -0000 1.245 -+++ bfd/elflink.h 4 Nov 2003 05:34:02 -0000 -@@ -2804,8 +2804,6 @@ struct elf_final_link_info - asection *hash_sec; - /* symbol version section (.gnu.version). */ - asection *symver_sec; -- /* first SHF_TLS section (if any). */ -- asection *first_tls_sec; - /* Buffer large enough to hold contents of any section. */ - bfd_byte *contents; - /* Buffer large enough to hold external relocs of any section. */ -@@ -3160,14 +3158,6 @@ elf_bfd_final_link (bfd *abfd, struct bf - finfo.symshndxbuf = NULL; - finfo.symbuf_count = 0; - finfo.shndxbuf_size = 0; -- finfo.first_tls_sec = NULL; -- for (o = abfd->sections; o != NULL; o = o->next) -- if ((o->flags & SEC_THREAD_LOCAL) != 0 -- && (o->flags & SEC_LOAD) != 0) -- { -- finfo.first_tls_sec = o; -- break; -- } - - /* Count up the number of relocations we will output for each output - section, so that we know the sizes of the reloc sections. We -@@ -3525,38 +3515,30 @@ elf_bfd_final_link (bfd *abfd, struct bf - goto error_return; - } - -- if (finfo.first_tls_sec) -+ if (elf_hash_table (info)->tls_sec) - { -- unsigned int align = 0; -- bfd_vma base = finfo.first_tls_sec->vma, end = 0; -+ bfd_vma base, end = 0; - asection *sec; - -- for (sec = finfo.first_tls_sec; -+ for (sec = elf_hash_table (info)->tls_sec; - sec && (sec->flags & SEC_THREAD_LOCAL); - sec = sec->next) - { - bfd_vma size = sec->_raw_size; - -- if (bfd_get_section_alignment (abfd, sec) > align) -- align = bfd_get_section_alignment (abfd, sec); -- if (sec->_raw_size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0) -+ if (size == 0 && (sec->flags & SEC_HAS_CONTENTS) == 0) - { - struct bfd_link_order *o; - -- size = 0; - for (o = sec->link_order_head; o != NULL; o = o->next) - if (size < o->offset + o->size) - size = o->offset + o->size; - } - end = sec->vma + size; - } -- elf_hash_table (info)->tls_segment -- = bfd_zalloc (abfd, sizeof (struct elf_link_tls_segment)); -- if (elf_hash_table (info)->tls_segment == NULL) -- goto error_return; -- elf_hash_table (info)->tls_segment->start = base; -- elf_hash_table (info)->tls_segment->size = end - base; -- elf_hash_table (info)->tls_segment->align = align; -+ base = elf_hash_table (info)->tls_sec->vma; -+ end = align_power (end, elf_hash_table (info)->tls_sec->alignment_power); -+ elf_hash_table (info)->tls_size = end - base; - } - - /* Since ELF permits relocations to be against local symbols, we -@@ -4503,8 +4485,8 @@ elf_link_output_extsym (struct elf_link_ - { - /* STT_TLS symbols are relative to PT_TLS segment - base. */ -- BFD_ASSERT (finfo->first_tls_sec != NULL); -- sym.st_value -= finfo->first_tls_sec->vma; -+ BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL); -+ sym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma; - } - } - } -@@ -4862,8 +4844,8 @@ elf_link_input_bfd (struct elf_final_lin - if (ELF_ST_TYPE (osym.st_info) == STT_TLS) - { - /* STT_TLS symbols are relative to PT_TLS segment base. */ -- BFD_ASSERT (finfo->first_tls_sec != NULL); -- osym.st_value -= finfo->first_tls_sec->vma; -+ BFD_ASSERT (elf_hash_table (finfo->info)->tls_sec != NULL); -+ osym.st_value -= elf_hash_table (finfo->info)->tls_sec->vma; - } - } - -@@ -5219,8 +5201,10 @@ elf_link_input_bfd (struct elf_final_lin - { - /* STT_TLS symbols are relative to PT_TLS - segment base. */ -- BFD_ASSERT (finfo->first_tls_sec != NULL); -- sym.st_value -= finfo->first_tls_sec->vma; -+ BFD_ASSERT (elf_hash_table (finfo->info) -+ ->tls_sec != NULL); -+ sym.st_value -= (elf_hash_table (finfo->info) -+ ->tls_sec->vma); - } - } - -Index: bfd/elf32-i386.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-i386.c,v -retrieving revision 1.112 -diff -u -p -r1.112 elf32-i386.c ---- bfd/elf32-i386.c 3 Nov 2003 15:17:38 -0000 1.112 -+++ bfd/elf32-i386.c 4 Nov 2003 05:34:04 -0000 -@@ -1953,10 +1953,10 @@ elf_i386_fake_sections (bfd *abfd ATTRIB - static bfd_vma - dtpoff_base (struct bfd_link_info *info) - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for @tpoff relocation -@@ -1965,14 +1965,12 @@ dtpoff_base (struct bfd_link_info *info) - static bfd_vma - tpoff (struct bfd_link_info *info, bfd_vma address) - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ struct elf_link_hash_table *htab = elf_hash_table (info); - -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (htab->tls_sec == NULL) - return 0; -- return (align_power (tls_segment->size, tls_segment->align) -- + tls_segment->start - address); -+ return htab->tls_size + htab->tls_sec->vma - address; - } - - /* Relocate an i386 ELF section. */ -Index: bfd/elf32-s390.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-s390.c,v -retrieving revision 1.49 -diff -u -p -r1.49 elf32-s390.c ---- bfd/elf32-s390.c 3 Nov 2003 15:17:39 -0000 1.49 -+++ bfd/elf32-s390.c 4 Nov 2003 05:34:06 -0000 -@@ -2216,10 +2216,10 @@ static bfd_vma - dtpoff_base (info) - struct bfd_link_info *info; - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for @tpoff relocation -@@ -2230,14 +2230,12 @@ tpoff (info, address) - struct bfd_link_info *info; - bfd_vma address; - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ struct elf_link_hash_table *htab = elf_hash_table (info); - -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (htab->tls_sec == NULL) - return 0; -- return (align_power (tls_segment->size, tls_segment->align) -- + tls_segment->start - address); -+ return htab->tls_size + htab->tls_sec->vma - address; - } - - /* Complain if TLS instruction relocation is against an invalid -Index: bfd/elf32-sh.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-sh.c,v -retrieving revision 1.95 -diff -u -p -r1.95 elf32-sh.c ---- bfd/elf32-sh.c 3 Nov 2003 15:17:39 -0000 1.95 -+++ bfd/elf32-sh.c 4 Nov 2003 05:34:10 -0000 -@@ -6021,10 +6021,10 @@ sh_elf_get_relocated_section_contents (b - static bfd_vma - dtpoff_base (struct bfd_link_info *info) - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for R_SH_TLS_TPOFF32.. */ -@@ -6032,12 +6032,12 @@ dtpoff_base (struct bfd_link_info *info) - static bfd_vma - tpoff (struct bfd_link_info *info, bfd_vma address) - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; - /* SH TLS ABI is variant I and static TLS block start just after tcbhead - structure which has 2 pointer fields. */ -- return (address - dtpoff_base (info) + 8); -+ return address - elf_hash_table (info)->tls_sec->vma + 8; - } - - static asection * -Index: bfd/elf32-sparc.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-sparc.c,v -retrieving revision 1.57 -diff -u -p -r1.57 elf32-sparc.c ---- bfd/elf32-sparc.c 3 Nov 2003 15:17:39 -0000 1.57 -+++ bfd/elf32-sparc.c 4 Nov 2003 05:34:11 -0000 -@@ -2082,10 +2082,10 @@ static bfd_vma - dtpoff_base (info) - struct bfd_link_info *info; - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for @tpoff relocation -@@ -2096,14 +2096,12 @@ tpoff (info, address) - struct bfd_link_info *info; - bfd_vma address; - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ struct elf_link_hash_table *htab = elf_hash_table (info); - -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (htab->tls_sec == NULL) - return 0; -- return -(align_power (tls_segment->size, tls_segment->align) -- + tls_segment->start - address); -+ return address - htab->tls_size - htab->tls_sec->vma; - } - - /* Relocate a SPARC ELF section. */ -Index: bfd/elf64-s390.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf64-s390.c,v -retrieving revision 1.50 -diff -u -p -r1.50 elf64-s390.c ---- bfd/elf64-s390.c 3 Nov 2003 15:17:39 -0000 1.50 -+++ bfd/elf64-s390.c 4 Nov 2003 05:34:13 -0000 -@@ -2186,10 +2186,10 @@ static bfd_vma - dtpoff_base (info) - struct bfd_link_info *info; - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for @tpoff relocation -@@ -2200,14 +2200,12 @@ tpoff (info, address) - struct bfd_link_info *info; - bfd_vma address; - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ struct elf_link_hash_table *htab = elf_hash_table (info); - -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (htab->tls_sec == NULL) - return 0; -- return (align_power (tls_segment->size, tls_segment->align) -- + tls_segment->start - address); -+ return htab->tls_size + htab->tls_sec->vma - address; - } - - /* Complain if TLS instruction relocation is against an invalid -Index: bfd/elf64-x86-64.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf64-x86-64.c,v -retrieving revision 1.68 -diff -u -p -r1.68 elf64-x86-64.c ---- bfd/elf64-x86-64.c 3 Nov 2003 15:17:39 -0000 1.68 -+++ bfd/elf64-x86-64.c 4 Nov 2003 05:34:14 -0000 -@@ -1739,10 +1739,10 @@ elf64_x86_64_size_dynamic_sections (bfd - static bfd_vma - dtpoff_base (struct bfd_link_info *info) - { -- /* If tls_segment is NULL, we should have signalled an error already. */ -- if (elf_hash_table (info)->tls_segment == NULL) -+ /* If tls_sec is NULL, we should have signalled an error already. */ -+ if (elf_hash_table (info)->tls_sec == NULL) - return 0; -- return elf_hash_table (info)->tls_segment->start; -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Return the relocation value for @tpoff relocation -@@ -1751,14 +1751,12 @@ dtpoff_base (struct bfd_link_info *info) - static bfd_vma - tpoff (struct bfd_link_info *info, bfd_vma address) - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ struct elf_link_hash_table *htab = elf_hash_table (info); - - /* If tls_segment is NULL, we should have signalled an error already. */ -- if (tls_segment == NULL) -+ if (htab->tls_sec == NULL) - return 0; -- return address - align_power (tls_segment->size, tls_segment->align) -- - tls_segment->start; -+ return address - htab->tls_size - htab->tls_sec->vma; - } - - /* Relocate an x86_64 ELF section. */ -Index: bfd/elfxx-ia64.c -=================================================================== -RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v -retrieving revision 1.106 -diff -u -p -r1.106 elfxx-ia64.c ---- bfd/elfxx-ia64.c 3 Nov 2003 15:17:40 -0000 1.106 -+++ bfd/elfxx-ia64.c 4 Nov 2003 05:34:17 -0000 -@@ -3544,12 +3544,10 @@ static bfd_vma - elfNN_ia64_tprel_base (info) - struct bfd_link_info *info; - { -- struct elf_link_tls_segment *tls_segment -- = elf_hash_table (info)->tls_segment; -+ asection *tls_sec = elf_hash_table (info)->tls_sec; - -- BFD_ASSERT (tls_segment != NULL); -- return (tls_segment->start -- - align_power ((bfd_vma) 16, tls_segment->align)); -+ BFD_ASSERT (tls_sec != NULL); -+ return tls_sec->vma - align_power ((bfd_vma) 16, tls_sec->alignment_power); - } - - /* Return the base VMA address which should be subtracted from real addresses -@@ -3560,8 +3558,8 @@ static bfd_vma - elfNN_ia64_dtprel_base (info) - struct bfd_link_info *info; - { -- BFD_ASSERT (elf_hash_table (info)->tls_segment != NULL); -- return elf_hash_table (info)->tls_segment->start; -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); -+ return elf_hash_table (info)->tls_sec->vma; - } - - /* Called through qsort to sort the .IA_64.unwind section during a -Index: bfd/elf64-alpha.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf64-alpha.c,v -retrieving revision 1.108 -diff -u -p -r1.108 elf64-alpha.c ---- bfd/elf64-alpha.c 3 Nov 2003 15:17:39 -0000 1.108 -+++ bfd/elf64-alpha.c 4 Nov 2003 05:34:20 -0000 -@@ -1158,13 +1158,15 @@ elf64_alpha_info_to_howto (abfd, cache_p - (r_type == R_ALPHA_TLSGD || r_type == R_ALPHA_TLSLDM ? 16 : 8) - - /* This is PT_TLS segment p_vaddr. */ --#define alpha_get_dtprel_base(tlss) \ -- ((tlss)->start) -+#define alpha_get_dtprel_base(info) \ -+ (elf_hash_table (info)->tls_sec->vma) - - /* Main program TLS (whose template starts at PT_TLS p_vaddr) - is assigned offset round(16, PT_TLS p_align). */ --#define alpha_get_tprel_base(tlss) \ -- ((tlss)->start - align_power ((bfd_vma) 16, (tlss)->align)) -+#define alpha_get_tprel_base(info) \ -+ (elf_hash_table (info)->tls_sec->vma \ -+ - align_power ((bfd_vma) 16, \ -+ elf_hash_table (info)->tls_sec->alignment_power)) - - /* These functions do relaxation for Alpha ELF. - -@@ -1198,7 +1200,6 @@ struct alpha_relax_info - Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Rela *relocs, *relend; - struct bfd_link_info *link_info; -- struct elf_link_tls_segment *tls_segment; - bfd_vma gp; - bfd *gotobj; - asection *tsec; -@@ -1224,8 +1225,6 @@ static bfd_boolean elf64_alpha_relax_gpr - static bfd_boolean elf64_alpha_relax_tls_get_addr - PARAMS((struct alpha_relax_info *info, bfd_vma symval, - Elf_Internal_Rela *irel, bfd_boolean)); --static struct elf_link_tls_segment *elf64_alpha_relax_find_tls_segment -- PARAMS((struct alpha_relax_info *, struct elf_link_tls_segment *)); - static bfd_boolean elf64_alpha_relax_section - PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again)); -@@ -1598,9 +1597,9 @@ elf64_alpha_relax_got_load (info, symval - { - bfd_vma dtp_base, tp_base; - -- BFD_ASSERT (info->tls_segment != NULL); -- dtp_base = alpha_get_dtprel_base (info->tls_segment); -- tp_base = alpha_get_tprel_base (info->tls_segment); -+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL); -+ dtp_base = alpha_get_dtprel_base (info->link_info); -+ tp_base = alpha_get_tprel_base (info->link_info); - disp = symval - (r_type == R_ALPHA_GOTDTPREL ? dtp_base : tp_base); - } - -@@ -1845,8 +1844,8 @@ elf64_alpha_relax_tls_get_addr (info, sy - bfd_vma tp_base; - bfd_signed_vma disp; - -- BFD_ASSERT (info->tls_segment != NULL); -- tp_base = alpha_get_tprel_base (info->tls_segment); -+ BFD_ASSERT (elf_hash_table (info->link_info)->tls_sec != NULL); -+ tp_base = alpha_get_tprel_base (info->link_info); - disp = symval - tp_base; - - if (disp >= -0x8000 && disp < 0x8000) -@@ -1961,53 +1960,6 @@ elf64_alpha_relax_tls_get_addr (info, sy - return TRUE; - } - --static struct elf_link_tls_segment * --elf64_alpha_relax_find_tls_segment (info, seg) -- struct alpha_relax_info *info; -- struct elf_link_tls_segment *seg; --{ -- bfd *output_bfd = info->sec->output_section->owner; -- asection *o; -- unsigned int align; -- bfd_vma base, end; -- -- for (o = output_bfd->sections; o ; o = o->next) -- if ((o->flags & SEC_THREAD_LOCAL) != 0 -- && (o->flags & SEC_LOAD) != 0) -- break; -- if (!o) -- return NULL; -- -- base = o->vma; -- align = 0; -- -- do -- { -- bfd_vma size; -- -- if (bfd_get_section_alignment (output_bfd, o) > align) -- align = bfd_get_section_alignment (output_bfd, o); -- -- size = o->_raw_size; -- if (size == 0 && (o->flags & SEC_HAS_CONTENTS) == 0) -- { -- struct bfd_link_order *lo; -- for (lo = o->link_order_head; lo ; lo = lo->next) -- if (size < lo->offset + lo->size) -- size = lo->offset + lo->size; -- } -- end = o->vma + size; -- o = o->next; -- } -- while (o && (o->flags & SEC_THREAD_LOCAL)); -- -- seg->start = base; -- seg->size = end - base; -- seg->align = align; -- -- return seg; --} -- - static bfd_boolean - elf64_alpha_relax_section (abfd, sec, link_info, again) - bfd *abfd; -@@ -2021,7 +1973,6 @@ elf64_alpha_relax_section (abfd, sec, li - Elf_Internal_Sym *isymbuf = NULL; - struct alpha_elf_got_entry **local_got_entries; - struct alpha_relax_info info; -- struct elf_link_tls_segment tls_segment; - - /* We are not currently changing any sizes, so only one pass. */ - *again = FALSE; -@@ -2079,11 +2030,6 @@ elf64_alpha_relax_section (abfd, sec, li - goto error_return; - } - -- /* Compute the TLS segment information. The version normally found in -- elf_hash_table (link_info)->tls_segment isn't built until final_link. -- ??? Probably should look into extracting this into a common function. */ -- info.tls_segment = elf64_alpha_relax_find_tls_segment (&info, &tls_segment); -- - for (irel = internal_relocs; irel < irelend; irel++) - { - bfd_vma symval; -@@ -2137,7 +2083,7 @@ elf64_alpha_relax_section (abfd, sec, li - if (r_type == R_ALPHA_TLSLDM) - { - info.tsec = bfd_abs_section_ptr; -- symval = alpha_get_tprel_base (info.tls_segment); -+ symval = alpha_get_tprel_base (info.link_info); - } - else - { -@@ -4294,7 +4240,6 @@ elf64_alpha_relocate_section (output_bfd - Elf_Internal_Shdr *symtab_hdr; - Elf_Internal_Rela *rel; - Elf_Internal_Rela *relend; -- struct elf_link_tls_segment *tls_segment; - asection *sgot, *srel, *srelgot; - bfd *dynobj, *gotobj; - bfd_vma gp, tp_base, dtp_base; -@@ -4348,11 +4293,10 @@ elf64_alpha_relocate_section (output_bfd - - local_got_entries = alpha_elf_tdata(input_bfd)->local_got_entries; - -- tls_segment = elf_hash_table (info)->tls_segment; -- if (tls_segment) -+ if (elf_hash_table (info)->tls_sec != NULL) - { -- dtp_base = alpha_get_dtprel_base (tls_segment); -- tp_base = alpha_get_tprel_base (tls_segment); -+ dtp_base = alpha_get_dtprel_base (info); -+ tp_base = alpha_get_tprel_base (info); - } - else - dtp_base = tp_base = 0; -@@ -4674,13 +4618,13 @@ elf64_alpha_relocate_section (output_bfd - } - else if (r_type == R_ALPHA_DTPREL64) - { -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - value -= dtp_base; - goto default_reloc; - } - else if (r_type == R_ALPHA_TPREL64) - { -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - if (!info->shared) - { - value -= tp_base; -@@ -4760,7 +4704,7 @@ elf64_alpha_relocate_section (output_bfd - value = 0; - else - { -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - value -= dtp_base; - } - bfd_put_64 (output_bfd, value, -@@ -4783,7 +4727,7 @@ elf64_alpha_relocate_section (output_bfd - bfd_archive_filename (input_bfd), h->root.root.root.string); - ret_val = FALSE; - } -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - value -= dtp_base; - if (r_type == R_ALPHA_DTPRELHI) - value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1); -@@ -4806,7 +4750,7 @@ elf64_alpha_relocate_section (output_bfd - bfd_archive_filename (input_bfd), h->root.root.root.string); - ret_val = FALSE; - } -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - value -= tp_base; - if (r_type == R_ALPHA_TPRELHI) - value = ((bfd_signed_vma) value >> 16) + ((value >> 15) & 1); -@@ -4827,7 +4771,7 @@ elf64_alpha_relocate_section (output_bfd - value = 0; - else - { -- BFD_ASSERT(tls_segment != NULL); -+ BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); - if (r_type == R_ALPHA_GOTDTPREL) - value -= dtp_base; - else if (!info->shared) -Index: bfd/elf32-ppc.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-ppc.c,v -retrieving revision 1.102 -diff -u -p -r1.102 elf32-ppc.c ---- bfd/elf32-ppc.c 3 Nov 2003 15:17:39 -0000 1.102 -+++ bfd/elf32-ppc.c 4 Nov 2003 05:34:23 -0000 -@@ -205,9 +205,6 @@ struct ppc_elf_link_hash_table - elf_linker_section_t *sdata2; - asection *sbss; - -- /* Short-cut to first output tls section. */ -- asection *tls_sec; -- - /* Shortcut to .__tls_get_addr. */ - struct elf_link_hash_entry *tls_get_addr; - -@@ -4184,25 +4181,18 @@ ppc_elf_gc_sweep_hook (bfd *abfd, - return TRUE; - } - --/* Set htab->tls_sec and htab->tls_get_addr. */ -+/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */ - --bfd_boolean -+asection * - ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) - { -- asection *tls; - struct ppc_elf_link_hash_table *htab; - - htab = ppc_elf_hash_table (info); - htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); - -- for (tls = obfd->sections; tls != NULL; tls = tls->next) -- if ((tls->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) -- == (SEC_THREAD_LOCAL | SEC_LOAD)) -- break; -- htab->tls_sec = tls; -- -- return tls != NULL; -+ return _bfd_elf_tls_setup (obfd, info); - } - - /* Run through all the TLS relocs looking for optimization -@@ -4917,8 +4907,8 @@ ppc_elf_relocate_section (bfd *output_bf - { - /* Was an LD reloc. */ - r_symndx = 0; -- rel->r_addend = htab->tls_sec->vma + DTP_OFFSET; -- rel[1].r_addend = htab->tls_sec->vma + DTP_OFFSET; -+ rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; -+ rel[1].r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; - } - r_type = R_PPC_TPREL16_HA; - rel->r_info = ELF32_R_INFO (r_symndx, r_type); -@@ -5156,7 +5146,7 @@ ppc_elf_relocate_section (bfd *output_bf - { - outrel.r_addend += relocation; - if (tls_ty & (TLS_GD | TLS_DTPREL | TLS_TPREL)) -- outrel.r_addend -= htab->tls_sec->vma; -+ outrel.r_addend -= htab->elf.tls_sec->vma; - } - loc = htab->relgot->contents; - loc += (htab->relgot->reloc_count++ -@@ -5174,7 +5164,7 @@ ppc_elf_relocate_section (bfd *output_bf - value = 1; - else if (tls_ty != 0) - { -- value -= htab->tls_sec->vma + DTP_OFFSET; -+ value -= htab->elf.tls_sec->vma + DTP_OFFSET; - if (tls_ty == (TLS_TLS | TLS_TPREL)) - value += DTP_OFFSET - TP_OFFSET; - -@@ -5262,7 +5252,7 @@ ppc_elf_relocate_section (bfd *output_bf - case R_PPC_DTPREL16_LO: - case R_PPC_DTPREL16_HI: - case R_PPC_DTPREL16_HA: -- addend -= htab->tls_sec->vma + DTP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET; - break; - - /* Relocations that may need to be propagated if this is a shared -@@ -5271,18 +5261,18 @@ ppc_elf_relocate_section (bfd *output_bf - case R_PPC_TPREL16_LO: - case R_PPC_TPREL16_HI: - case R_PPC_TPREL16_HA: -- addend -= htab->tls_sec->vma + TP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + TP_OFFSET; - /* The TPREL16 relocs shouldn't really be used in shared - libs as they will result in DT_TEXTREL being set, but - support them anyway. */ - goto dodyn; - - case R_PPC_TPREL32: -- addend -= htab->tls_sec->vma + TP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + TP_OFFSET; - goto dodyn; - - case R_PPC_DTPREL32: -- addend -= htab->tls_sec->vma + DTP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET; - goto dodyn; - - case R_PPC_DTPMOD32: -Index: bfd/elf32-ppc.h -=================================================================== -RCS file: /cvs/src/src/bfd/elf32-ppc.h,v -retrieving revision 1.2 -diff -u -p -r1.2 elf32-ppc.h ---- bfd/elf32-ppc.h 24 Jun 2003 14:03:53 -0000 1.2 -+++ bfd/elf32-ppc.h 4 Nov 2003 05:34:23 -0000 -@@ -17,5 +17,5 @@ You should have received a copy of the G - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - --bfd_boolean ppc_elf_tls_setup (bfd *, struct bfd_link_info *); -+asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *); - bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *); -Index: bfd/elf64-ppc.c -=================================================================== -RCS file: /cvs/src/src/bfd/elf64-ppc.c,v -retrieving revision 1.134 -diff -u -p -r1.134 elf64-ppc.c ---- bfd/elf64-ppc.c 3 Nov 2003 15:17:39 -0000 1.134 -+++ bfd/elf64-ppc.c 4 Nov 2003 05:34:27 -0000 -@@ -2837,9 +2837,6 @@ struct ppc_link_hash_table - asection *brlt; - asection *relbrlt; - -- /* Short-cut to first output tls section. */ -- asection *tls_sec; -- - /* Shortcut to .__tls_get_addr. */ - struct elf_link_hash_entry *tls_get_addr; - -@@ -5172,22 +5169,14 @@ ppc64_elf_edit_opd (bfd *obfd, struct bf - return TRUE; - } - --/* Set htab->tls_sec. */ -+/* Set htab->tls_get_addr and call the generic ELF tls_setup function. */ - --bfd_boolean -+asection * - ppc64_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) - { -- asection *tls; - struct ppc_link_hash_table *htab; - -- for (tls = obfd->sections; tls != NULL; tls = tls->next) -- if ((tls->flags & (SEC_THREAD_LOCAL | SEC_LOAD)) -- == (SEC_THREAD_LOCAL | SEC_LOAD)) -- break; -- - htab = ppc_hash_table (info); -- htab->tls_sec = tls; -- - if (htab->tls_get_addr != NULL) - { - struct elf_link_hash_entry *h = htab->tls_get_addr; -@@ -5199,7 +5188,7 @@ ppc64_elf_tls_setup (bfd *obfd, struct b - htab->tls_get_addr = h; - } - -- return tls != NULL; -+ return _bfd_elf_tls_setup (obfd, info); - } - - /* Run through all the TLS relocs looking for optimization -@@ -5282,7 +5271,7 @@ ppc64_elf_tls_optimize (bfd *obfd ATTRIB - is_local = TRUE; - value += sym_sec->output_offset; - value += sym_sec->output_section->vma; -- value -= htab->tls_sec->vma; -+ value -= htab->elf.tls_sec->vma; - ok_tprel = (value + TP_OFFSET + ((bfd_vma) 1 << 31) - < (bfd_vma) 1 << 32); - } -@@ -7690,8 +7679,8 @@ ppc64_elf_relocate_section (bfd *output_ - { - /* Was an LD reloc. */ - r_symndx = 0; -- rel->r_addend = htab->tls_sec->vma + DTP_OFFSET; -- rel[1].r_addend = htab->tls_sec->vma + DTP_OFFSET; -+ rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; -+ rel[1].r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; - } - else if (toc_symndx != 0) - r_symndx = toc_symndx; -@@ -8096,7 +8085,7 @@ ppc64_elf_relocate_section (bfd *output_ - { - outrel.r_addend += relocation; - if (tls_type & (TLS_GD | TLS_DTPREL | TLS_TPREL)) -- outrel.r_addend -= htab->tls_sec->vma; -+ outrel.r_addend -= htab->elf.tls_sec->vma; - } - loc = relgot->contents; - loc += (relgot->reloc_count++ -@@ -8113,7 +8102,7 @@ ppc64_elf_relocate_section (bfd *output_ - relocation = 1; - else if (tls_type != 0) - { -- relocation -= htab->tls_sec->vma + DTP_OFFSET; -+ relocation -= htab->elf.tls_sec->vma + DTP_OFFSET; - if (tls_type == (TLS_TLS | TLS_TPREL)) - relocation += DTP_OFFSET - TP_OFFSET; - -@@ -8223,7 +8212,7 @@ ppc64_elf_relocate_section (bfd *output_ - case R_PPC64_TPREL16_HIGHERA: - case R_PPC64_TPREL16_HIGHEST: - case R_PPC64_TPREL16_HIGHESTA: -- addend -= htab->tls_sec->vma + TP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + TP_OFFSET; - if (info->shared) - /* The TPREL16 relocs shouldn't really be used in shared - libs as they will result in DT_TEXTREL being set, but -@@ -8241,7 +8230,7 @@ ppc64_elf_relocate_section (bfd *output_ - case R_PPC64_DTPREL16_HIGHERA: - case R_PPC64_DTPREL16_HIGHEST: - case R_PPC64_DTPREL16_HIGHESTA: -- addend -= htab->tls_sec->vma + DTP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET; - break; - - case R_PPC64_DTPMOD64: -@@ -8250,11 +8239,11 @@ ppc64_elf_relocate_section (bfd *output_ - goto dodyn; - - case R_PPC64_TPREL64: -- addend -= htab->tls_sec->vma + TP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + TP_OFFSET; - goto dodyn; - - case R_PPC64_DTPREL64: -- addend -= htab->tls_sec->vma + DTP_OFFSET; -+ addend -= htab->elf.tls_sec->vma + DTP_OFFSET; - /* Fall thru */ - - /* Relocations that may need to be propagated if this is a -Index: bfd/elf64-ppc.h -=================================================================== -RCS file: /cvs/src/src/bfd/elf64-ppc.h,v -retrieving revision 1.13 -diff -u -p -r1.13 elf64-ppc.h ---- bfd/elf64-ppc.h 10 Jul 2003 00:37:26 -0000 1.13 -+++ bfd/elf64-ppc.h 4 Nov 2003 05:34:27 -0000 -@@ -23,7 +23,7 @@ bfd_boolean ppc64_elf_mark_entry_syms - (struct bfd_link_info *); - bfd_boolean ppc64_elf_edit_opd - (bfd *, struct bfd_link_info *); --bfd_boolean ppc64_elf_tls_setup -+asection *ppc64_elf_tls_setup - (bfd *, struct bfd_link_info *); - bfd_boolean ppc64_elf_tls_optimize - (bfd *, struct bfd_link_info *); -Index: ld/emultempl/elf32.em -=================================================================== -RCS file: /cvs/src/src/ld/emultempl/elf32.em,v -retrieving revision 1.104 -diff -u -p -r1.104 elf32.em ---- ld/emultempl/elf32.em 20 Aug 2003 08:37:15 -0000 1.104 -+++ ld/emultempl/elf32.em 4 Nov 2003 05:34:28 -0000 -@@ -845,6 +845,9 @@ gld${EMULATION_NAME}_before_allocation ( - const char *rpath; - asection *sinterp; - -+ if (link_info.hash->creator->flavour == bfd_target_elf_flavour) -+ _bfd_elf_tls_setup (output_bfd, &link_info); -+ - /* If we are going to make any variable assignments, we need to let - the ELF backend know about them in case the variables are - referred to by dynamic objects. */ - - diff --git a/sys-devel/binutils/files/2.14/binutils-mips-openssl-got-fix.patch b/sys-devel/binutils/files/2.14/binutils-mips-openssl-got-fix.patch deleted file mode 100644 index cdc9b520a098..000000000000 --- a/sys-devel/binutils/files/2.14/binutils-mips-openssl-got-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- source-orig/bfd/elfxx-mips.c Sun May 25 09:20:23 2003 -+++ source/bfd/elfxx-mips.c Sun May 25 09:55:20 2003 -@@ -7798,10 +7798,10 @@ _bfd_mips_elf_hide_symbol (info, entry, - h = (struct mips_elf_link_hash_entry *) entry; - if (h->forced_local) - return; -- h->forced_local = TRUE; -+ h->forced_local = force_local; - - dynobj = elf_hash_table (info)->dynobj; -- if (dynobj != NULL) -+ if (dynobj != NULL && force_local) - { - got = mips_elf_got_section (dynobj, FALSE); - g = mips_elf_section_data (got)->u.got_info; diff --git a/sys-devel/binutils/files/2.15/05_all_binutils-2.15-elf32-arm-textrel.patch b/sys-devel/binutils/files/2.15/05_all_binutils-2.15-elf32-arm-textrel.patch deleted file mode 100644 index 381d6859930b..000000000000 --- a/sys-devel/binutils/files/2.15/05_all_binutils-2.15-elf32-arm-textrel.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -uNr binutils-2.15.orig/ binutils-2.15 -diff -uNr binutils-2.15.orig/bfd/elf32-arm.h binutils-2.15/bfd/elf32-arm.h ---- binutils-2.15.orig/bfd/elf32-arm.h 2004-05-17 13:35:58.000000000 -0600 -+++ binutils-2.15/bfd/elf32-arm.h 2004-06-01 10:44:52.000000000 -0600 -@@ -87,6 +87,8 @@ - #endif - static bfd_boolean allocate_dynrelocs - PARAMS ((struct elf_link_hash_entry *h, PTR inf)); -+static bfd_boolean elf32_arm_readonly_dynrelocs -+ PARAMS ((struct elf_link_hash_entry *, PTR)); - static bfd_boolean create_got_section - PARAMS ((bfd * dynobj, struct bfd_link_info * info)); - static bfd_boolean elf32_arm_create_dynamic_sections -@@ -3457,6 +3459,37 @@ - return TRUE; - } - -+/* Find any dynamic relocs that apply to read-only sections. */ -+ -+static bfd_boolean -+elf32_arm_readonly_dynrelocs (h, inf) -+ struct elf_link_hash_entry *h; -+ PTR inf; -+{ -+ struct elf32_arm_link_hash_entry *eh; -+ struct elf32_arm_relocs_copied *p; -+ -+ if (h->root.type == bfd_link_hash_warning) -+ h = (struct elf_link_hash_entry *) h->root.u.i.link; -+ -+ eh = (struct elf32_arm_link_hash_entry *) h; -+ for (p = eh->relocs_copied; p != NULL; p = p->next) -+ { -+ asection *s = p->section; -+ -+ if (s != NULL && (s->flags & SEC_READONLY) != 0) -+ { -+ struct bfd_link_info *info = (struct bfd_link_info *) inf; -+ -+ info->flags |= DF_TEXTREL; -+ -+ /* Not an error, just cut short the traversal. */ -+ return FALSE; -+ } -+ } -+ return TRUE; -+} -+ - /* Set the sizes of the dynamic sections. */ - - static bfd_boolean -@@ -3666,6 +3699,12 @@ - return FALSE; - } - -+ /* If any dynamic relocs apply to a read-only section, -+ then we need a DT_TEXTREL entry. */ -+ if ((info->flags & DF_TEXTREL) == 0) -+ elf_link_hash_traverse (&htab->root, elf32_arm_readonly_dynrelocs, -+ (PTR) info); -+ - if ((info->flags & DF_TEXTREL) != 0) - { - if (!add_dynamic_entry (DT_TEXTREL, 0)) diff --git a/sys-devel/binutils/files/2.15/40_all_binutils-uclibc-linker.patch b/sys-devel/binutils/files/2.15/40_all_binutils-uclibc-linker.patch deleted file mode 100644 index 8a0c08f2e12a..000000000000 --- a/sys-devel/binutils/files/2.15/40_all_binutils-uclibc-linker.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- ld/emultempl/elf32.em.orig 2004-09-28 14:35:13 +0000 -+++ ld/emultempl/elf32.em 2004-09-28 14:36:00 +0000 -@@ -288,3 +288,3 @@ - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF -@@ -444,3 +444,3 @@ - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF -@@ -719,3 +719,3 @@ - case ${target} in -- *-*-linux-gnu*) -+ *-*-linux-gnu* | *-*-linux-uclibc*) - cat >>e${EMULATION_NAME}.c <<EOF diff --git a/sys-devel/binutils/files/2.15/52_all_binutils-20040527-uclibc-100-conf.patch b/sys-devel/binutils/files/2.15/52_all_binutils-20040527-uclibc-100-conf.patch deleted file mode 100644 index b1de2f433bcb..000000000000 --- a/sys-devel/binutils/files/2.15/52_all_binutils-20040527-uclibc-100-conf.patch +++ /dev/null @@ -1,552 +0,0 @@ -diff -urN binutils-2.15.90.0.1.1-dist/bfd/config.bfd binutils-2.15.90.0.1.1/bfd/config.bfd ---- binutils-2.15.90.0.1.1-dist/bfd/config.bfd 2004-01-14 15:07:43.000000000 -0600 -+++ binutils-2.15.90.0.1.1/bfd/config.bfd 2004-08-06 17:29:55.000000000 -0500 -@@ -121,7 +121,7 @@ - targ_defvec=ecoffalpha_little_vec - targ_selvecs=bfd_elf64_alpha_vec - ;; -- alpha*-*-linux-gnu* | alpha*-*-elf*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc* | alpha*-*-elf*) - targ_defvec=bfd_elf64_alpha_vec - targ_selvecs=ecoffalpha_little_vec - ;; -@@ -131,7 +131,7 @@ - alpha*-*-*) - targ_defvec=ecoffalpha_little_vec - ;; -- ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) -+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-linux-uclibc* | ia64*-*-elf* | ia64*-*-kfreebsd*-gnu) - targ_defvec=bfd_elf64_ia64_little_vec - targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec" - ;; -@@ -208,7 +208,7 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- armeb-*-elf | arm*b-*-linux-gnu*) -+ armeb-*-elf | arm*b-*-linux-gnu* | arm*b-*-linux-uclibc*) - targ_defvec=bfd_elf32_bigarm_vec - targ_selvecs=bfd_elf32_littlearm_vec - ;; -@@ -216,7 +216,7 @@ - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec - ;; -- arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-conix* | \ -+ arm-*-elf | arm-*-freebsd* | arm*-*-linux-gnu* | arm*-*-linux-uclibc* | arm*-*-conix* | \ - arm*-*-uclinux* | arm-*-kfreebsd*-gnu | arm-*-vxworks) - targ_defvec=bfd_elf32_littlearm_vec - targ_selvecs=bfd_elf32_bigarm_vec -@@ -350,7 +350,7 @@ - ;; - - #ifdef BFD64 -- hppa*64*-*-linux-gnu*) -+ hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) - targ_defvec=bfd_elf64_hppa_linux_vec - targ_selvecs=bfd_elf64_hppa_vec - ;; -@@ -361,7 +361,7 @@ - ;; - #endif - -- hppa*-*-linux-gnu* | hppa*-*-netbsd*) -+ hppa*-*-linux-gnu* | hppa*-*-linux-uclibc* | hppa*-*-netbsd*) - targ_defvec=bfd_elf32_hppa_linux_vec - targ_selvecs=bfd_elf32_hppa_vec - ;; -@@ -483,7 +483,7 @@ - targ_selvecs=bfd_elf32_i386_vec - targ_underscore=yes - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - targ_defvec=bfd_elf32_i386_vec - targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec" - targ64_selvecs=bfd_elf64_x86_64_vec -@@ -497,7 +497,7 @@ - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec" - ;; -- x86_64-*-linux-gnu*) -+ x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) - targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec" - ;; -@@ -672,7 +672,7 @@ - targ_selvecs=bfd_elf32_m68k_vec - targ_underscore=yes - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - targ_defvec=bfd_elf32_m68k_vec - targ_selvecs=m68klinux_vec - ;; -@@ -952,7 +952,8 @@ - ;; - #endif - powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \ -- powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \ -+ powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-linux-uclibc* | \ -+ powerpc-*-rtems* | \ - powerpc-*-chorus* | powerpc-*-vxworks* | powerpc-*-windiss*) - targ_defvec=bfd_elf32_powerpc_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec" -@@ -984,8 +985,8 @@ - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - ;; - powerpcle-*-elf* | powerpcle-*-sysv4* | powerpcle-*-eabi* | \ -- powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-vxworks* |\ -- powerpcle-*-rtems*) -+ powerpcle-*-solaris2* | powerpcle-*-linux-gnu* | powerpcle-*-linux-uclibc* |\ -+ powerpcle-*-vxworks* | powerpcle-*-rtems*) - targ_defvec=bfd_elf32_powerpcle_vec - targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec" - targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec" -@@ -1141,7 +1142,7 @@ - targ_selvecs="bfd_elf32_sparc_vec sunos_big_vec" - targ_underscore=yes - ;; -- sparc-*-linux-gnu*) -+ sparc-*-linux-gnu* | sparc-*-linux-uclibc*) - targ_defvec=bfd_elf32_sparc_vec - targ_selvecs="sparclinux_vec bfd_elf64_sparc_vec sunos_big_vec" - ;; -@@ -1188,7 +1189,7 @@ - targ_defvec=sunos_big_vec - targ_underscore=yes - ;; -- sparc64-*-linux-gnu*) -+ sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) - targ_defvec=bfd_elf64_sparc_vec - targ_selvecs="bfd_elf32_sparc_vec sparclinux_vec sunos_big_vec" - ;; -@@ -1257,7 +1258,7 @@ - targ_underscore=yes - ;; - -- vax-*-linux-gnu*) -+ vax-*-linux-gnu* | vax-*-linux-uclibc*) - targ_defvec=bfd_elf32_vax_vec - ;; - -diff -urN binutils-2.15.90.0.1.1-dist/bfd/configure binutils-2.15.90.0.1.1/bfd/configure ---- binutils-2.15.90.0.1.1-dist/bfd/configure 2004-03-05 19:18:21.000000000 -0600 -+++ binutils-2.15.90.0.1.1/bfd/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1699,6 +1699,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -5278,7 +5283,7 @@ - alpha*-*-freebsd* | alpha*-*-kfreebsd*-gnu) - COREFILE='' - ;; -- alpha*-*-linux-gnu*) -+ alpha*-*-linux-gnu* | alpha*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/alphalinux.h"' - ;; -@@ -5338,7 +5343,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386mach3.h"' - ;; -- i[3-7]86-*-linux-gnu*) -+ i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/i386linux.h"' - ;; -@@ -5388,7 +5393,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/hp300bsd.h"' - ;; -- m68*-*-linux-gnu*) -+ m68*-*-linux-gnu* | m68*-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/m68klinux.h"' - ;; -@@ -5489,7 +5494,7 @@ - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxult2.h"' - ;; -- vax-*-linux-gnu*) -+ vax-*-linux-gnu* | vax-*-linux-uclibc*) - COREFILE=trad-core.lo - TRAD_HEADER='"hosts/vaxlinux.h"' - ;; -diff -urN binutils-2.15.90.0.1.1-dist/binutils/configure binutils-2.15.90.0.1.1/binutils/configure ---- binutils-2.15.90.0.1.1-dist/binutils/configure 2004-01-14 15:07:44.000000000 -0600 -+++ binutils-2.15.90.0.1.1/binutils/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1574,6 +1574,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.15.90.0.1.1-dist/configure binutils-2.15.90.0.1.1/configure ---- binutils-2.15.90.0.1.1-dist/configure 2004-03-03 14:24:33.000000000 -0600 -+++ binutils-2.15.90.0.1.1/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1288,6 +1288,18 @@ - i[3456789]86-*-freebsd* | i[3456789]86-*-kfreebsd*-gnu) - noconfigdirs="$noconfigdirs target-newlib target-libgloss" - ;; -+ i[3456789]86-*-linux-uclibc*) -+ # This section makes it possible to build newlib natively on linux. -+ # If we are using a cross compiler then don't configure newlib. -+ if test x${is_cross_compiler} != xno ; then -+ noconfigdirs="$noconfigdirs target-newlib" -+ fi -+ noconfigdirs="$noconfigdirs target-libgloss" -+ # If we are not using a cross compiler, do configure newlib. -+ # Note however, that newlib will only be configured in this situation -+ # if the --with-newlib option has been given, because otherwise -+ # 'target-newlib' will appear in skipdirs. -+ ;; - i[3456789]86-*-linux*) - # The GCC port for glibc1 has no MD_FALLBACK_FRAME_STATE_FOR, so let's - # not build java stuff by default. -diff -urN binutils-2.15.90.0.1.1-dist/gas/configure binutils-2.15.90.0.1.1/gas/configure ---- binutils-2.15.90.0.1.1-dist/gas/configure 2004-03-05 19:18:21.000000000 -0600 -+++ binutils-2.15.90.0.1.1/gas/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -3401,6 +3401,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -@@ -4226,6 +4231,7 @@ - alpha*-*-osf*) fmt=ecoff ;; - alpha*-*-linuxecoff*) fmt=ecoff ;; - alpha*-*-linux-gnu*) fmt=elf em=linux ;; -+ alpha*-*-linux-uclibc*) fmt=elf em=linux ;; - alpha*-*-netbsd*) fmt=elf em=nbsd ;; - alpha*-*-openbsd*) fmt=elf em=obsd ;; - -@@ -4242,6 +4248,7 @@ - arm*-*-conix*) fmt=elf ;; - arm-*-linux*aout*) fmt=aout em=linux ;; - arm*-*-linux-gnu*) fmt=elf em=linux ;; -+ arm*-*-linux-uclibc*) fmt=elf em=linux ;; - arm*-*-uclinux*) fmt=elf em=linux ;; - arm-*-netbsdelf*) fmt=elf em=nbsd ;; - arm-*-*n*bsd*) fmt=aout em=nbsd ;; -@@ -4255,6 +4262,7 @@ - avr-*-*) fmt=elf ;; - - cris-*-linux-gnu*) fmt=multi bfd_gas=yes em=linux ;; -+ cris-*-linux-uclibc*) fmt=multi bfd_gas=yes em=linux ;; - cris-*-*) fmt=multi bfd_gas=yes ;; - - d10v-*-*) fmt=elf ;; -@@ -4311,7 +4319,9 @@ - i386-*-linux*oldld) fmt=aout em=linux ;; - i386-*-linux*coff*) fmt=coff em=linux ;; - i386-*-linux-gnu*) fmt=elf em=linux ;; -+ i386-*-linux-uclibc*) fmt=elf em=linux ;; - x86_64-*-linux-gnu*) fmt=elf em=linux ;; -+ x86_64-*-linux-uclibc*) fmt=elf em=linux ;; - i386-*-lynxos*) fmt=coff em=lynx ;; - i386-*-sysv[45]*) fmt=elf ;; - i386-*-solaris*) fmt=elf ;; -@@ -4371,6 +4381,7 @@ - ia64-*-elf*) fmt=elf ;; - ia64-*-aix*) fmt=elf em=ia64aix ;; - ia64-*-linux-gnu*) fmt=elf em=linux ;; -+ ia64-*-linux-uclibc*) fmt=elf em=linux ;; - ia64-*-hpux*) fmt=elf em=hpux ;; - ia64-*-netbsd*) fmt=elf em=nbsd ;; - -@@ -4398,6 +4409,7 @@ - m68k-*-hpux*) fmt=hp300 em=hp300 ;; - m68k-*-linux*aout*) fmt=aout em=linux ;; - m68k-*-linux-gnu*) fmt=elf em=linux ;; -+ m68k-*-linux-uclibc*) fmt=elf em=linux ;; - m68k-*-uclinux*) fmt=elf ;; - m68k-*-gnu*) fmt=elf ;; - m68k-*-lynxos*) fmt=coff em=lynx ;; -@@ -4461,6 +4473,7 @@ - ppc-*-beos*) fmt=coff ;; - ppc-*-*n*bsd* | ppc-*-elf*) fmt=elf ;; - ppc-*-eabi* | ppc-*-sysv4*) fmt=elf ;; -+ ppc-*-linux-uclibc* | \ - ppc-*-linux-gnu*) fmt=elf em=linux - case "$endian" in - big) ;; -@@ -4488,7 +4501,9 @@ - ppc-*-kaos*) fmt=elf ;; - - s390x-*-linux-gnu*) fmt=elf em=linux ;; -+ s390x-*-linux-uclibc*) fmt=elf em=linux ;; - s390-*-linux-gnu*) fmt=elf em=linux ;; -+ s390-*-linux-uclibc*) fmt=elf em=linux ;; - - sh*-*-linux*) fmt=elf em=linux - case ${cpu} in -@@ -4521,6 +4536,7 @@ - sparc-*-coff) fmt=coff ;; - sparc-*-linux*aout*) fmt=aout em=linux ;; - sparc-*-linux-gnu*) fmt=elf em=linux ;; -+ sparc-*-linux-uclibc*) fmt=elf em=linux ;; - sparc-*-lynxos*) fmt=coff em=lynx ;; - sparc-fujitsu-none) fmt=aout ;; - sparc-*-elf) fmt=elf ;; -diff -urN binutils-2.15.90.0.1.1-dist/gprof/configure binutils-2.15.90.0.1.1/gprof/configure ---- binutils-2.15.90.0.1.1-dist/gprof/configure 2004-01-14 15:07:51.000000000 -0600 -+++ binutils-2.15.90.0.1.1/gprof/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1570,6 +1570,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.15.90.0.1.1-dist/ld/configure binutils-2.15.90.0.1.1/ld/configure ---- binutils-2.15.90.0.1.1-dist/ld/configure 2003-05-05 16:46:49.000000000 -0500 -+++ binutils-2.15.90.0.1.1/ld/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1578,6 +1578,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' -diff -urN binutils-2.15.90.0.1.1-dist/ld/configure.tgt binutils-2.15.90.0.1.1/ld/configure.tgt ---- binutils-2.15.90.0.1.1-dist/ld/configure.tgt 2004-01-14 15:07:52.000000000 -0600 -+++ binutils-2.15.90.0.1.1/ld/configure.tgt 2004-08-06 17:29:55.000000000 -0500 -@@ -30,6 +30,7 @@ - targ_extra_emuls="criself crislinux" - targ_extra_libpath=$targ_extra_emuls ;; - cris-*-linux-gnu*) targ_emul=crislinux ;; -+cris-*-linux-uclibc*) targ_emul=crislinux ;; - cris-*-*) targ_emul=criself - targ_extra_emuls="crisaout crislinux" - targ_extra_libpath=$targ_extra_emuls ;; -@@ -59,14 +60,16 @@ - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/aout//'` - tdir_sun4=sparc-sun-sunos4 - ;; --sparc64-*-linux-gnu*) targ_emul=elf64_sparc -+sparc64-*-linux-gnu* | sparc64-*-linux-uclibc*) \ -+ targ_emul=elf64_sparc - targ_extra_emuls="elf32_sparc sparclinux sun4" - targ_extra_libpath=elf32_sparc - tdir_elf32_sparc=`echo ${targ_alias} | sed -e 's/64//'` - tdir_sparclinux=${tdir_elf32_sparc}aout - tdir_sun4=sparc-sun-sunos4 - ;; --sparc*-*-linux-gnu*) targ_emul=elf32_sparc -+sparc*-*-linux-gnu* | sparc*-*-linux-uclibc*) \ -+ targ_emul=elf32_sparc - targ_extra_emuls="sparclinux elf64_sparc sun4" - targ_extra_libpath=elf64_sparc - tdir_sparclinux=${targ_alias}aout -@@ -118,7 +121,9 @@ - m32r*le-*-elf*) targ_emul=m32rlelf ;; - m32r*-*-elf*) targ_emul=m32relf ;; - m32r*le-*-linux-gnu*) targ_emul=m32rlelf_linux ;; -+m32r*le-*-linux-uclibc*) targ_emul=m32rlelf_linux ;; - m32r*-*-linux-gnu*) targ_emul=m32relf_linux ;; -+m32r*-*-linux-uclibc*) targ_emul=m32relf_linux ;; - m68hc11-*-*|m6811-*-*) targ_emul=m68hc11elf - targ_extra_emuls="m68hc11elfb m68hc12elf m68hc12elfb" ;; - m68hc12-*-*|m6812-*-*) targ_emul=m68hc12elf -@@ -128,7 +133,7 @@ - m68*-ericsson-ose) targ_emul=sun3 ;; - m68*-apple-aux*) targ_emul=m68kaux ;; - *-tandem-none) targ_emul=st2000 ;; --i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; -+i370-*-elf* | i370-*-linux-gnu* | i370-*-linux-uclibc*) targ_emul=elf32i370 ;; - i[3-7]86-*-nto-qnx*) targ_emul=i386nto ;; - i[3-7]86-*-vsta) targ_emul=vsta ;; - i[3-7]86-go32-rtems*) targ_emul=i386go32 ;; -@@ -152,14 +157,16 @@ - tdir_elf_i386=`echo ${targ_alias} | sed -e 's/aout//'` - ;; - i[3-7]86-*-linux*oldld) targ_emul=i386linux; targ_extra_emuls=elf_i386 ;; --i[3-7]86-*-linux-gnu*) targ_emul=elf_i386 -+i[3-7]86-*-linux-gnu* | i[3-7]86-*-linux-uclibc*) \ -+ targ_emul=elf_i386 - targ_extra_emuls=i386linux - if test x${want64} = xtrue; then - targ_extra_emuls="$targ_extra_emuls elf_x86_64" - fi - tdir_i386linux=${targ_alias}aout - ;; --x86_64-*-linux-gnu*) targ_emul=elf_x86_64 -+x86_64-*-linux-gnu* | x86_64-*-linux-uclibc*) \ -+ targ_emul=elf_x86_64 - targ_extra_emuls="elf_i386 i386linux" - targ_extra_libpath=elf_i386 - tdir_i386linux=`echo ${targ_alias}aout | sed -e 's/x86_64/i386/'` -@@ -259,10 +266,13 @@ - arm9e-*-elf) targ_emul=armelf ;; - arm-*-oabi) targ_emul=armelf_oabi ;; - arm*b-*-linux-gnu*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; -+arm*b-*-linux-uclibc*) targ_emul=armelfb_linux; targ_extra_emuls=armelfb ;; - arm*-*-linux-gnu*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+arm*-*-linux-uclibc*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - arm*-*-conix*) targ_emul=armelf ;; --thumb-*-linux-gnu* | thumb-*-uclinux*) targ_emul=armelf_linux; targ_extra_emuls=armelf ;; -+thumb-*-linux-gnu* | thumb-*-linux-uclibc* | thumb-*-uclinux*) \ -+ targ_emul=armelf_linux; targ_extra_emuls=armelf ;; - strongarm-*-coff) targ_emul=armcoff ;; - strongarm-*-elf) targ_emul=armelf ;; - strongarm-*-kaos*) targ_emul=armelf ;; -@@ -363,7 +373,8 @@ - targ_extra_emuls=m68kelf - tdir_m68kelf=`echo ${targ_alias} | sed -e 's/aout//'` - ;; --m68k-*-linux-gnu*) targ_emul=m68kelf -+m68k-*-linux-gnu* | m68k-*-linux-uclibc*) \ -+ targ_emul=m68kelf - targ_extra_emuls=m68klinux - tdir_m68klinux=`echo ${targ_alias} | sed -e 's/linux/linuxaout/'` - ;; -@@ -380,9 +391,9 @@ - m68*-*-psos*) targ_emul=m68kpsos ;; - m68*-*-rtemscoff*) targ_emul=m68kcoff ;; - m68*-*-rtems*) targ_emul=m68kelf ;; --hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; -+hppa*64*-*-linux-gnu* | hppa*64*-*-linux-uclibc*) targ_emul=hppa64linux ;; - hppa*64*-*) targ_emul=elf64hppa ;; --hppa*-*-linux-gnu*) targ_emul=hppalinux ;; -+hppa*-*-linux-gnu* | hppa*-*-linux-uclibc*) targ_emul=hppalinux ;; - hppa*-*-*elf*) targ_emul=hppaelf ;; - hppa*-*-lites*) targ_emul=hppaelf ;; - hppa*-*-netbsd*) targ_emul=hppanbsd ;; -@@ -395,6 +406,7 @@ - targ_emul=vaxnbsd - targ_extra_emuls=elf32vax ;; - vax-*-linux-gnu*) targ_emul=elf32vax ;; -+vax-*-linux-uclibc*) targ_emul=elf32vax ;; - mips*-*-pe) targ_emul=mipspe ; - targ_extra_ofiles="deffilep.o pe-dll.o" ;; - mips*-dec-ultrix*) targ_emul=mipslit ;; -@@ -429,16 +441,16 @@ - mips*-*-vxworks*) targ_emul=elf32ebmip - targ_extra_emuls="elf32elmip" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-gnu*) targ_emul=elf32ltsmipn32 -+mips64*el-*-linux-gnu* | mips64*el-*-linux-uclibc*) targ_emul=elf32ltsmipn32 - targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" - ;; --mips64*-*-linux-gnu*) targ_emul=elf32btsmipn32 -+mips64*-*-linux-gnu* | mips64*-*-linux-uclibc*) targ_emul=elf32btsmipn32 - targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" - ;; --mips*el-*-linux-gnu*) targ_emul=elf32ltsmip -+mips*el-*-linux-gnu* | mips*el-*-linux-uclibc*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" - ;; --mips*-*-linux-gnu*) targ_emul=elf32btsmip -+mips*-*-linux-gnu* | mips*-*-linux-uclibc*) targ_emul=elf32btsmip - targ_extra_emuls="elf32ltsmip elf32btsmipn32 elf64btsmip elf32ltsmipn32 elf64ltsmip" - ;; - mips*-*-lnews*) targ_emul=mipslnews ;; -@@ -461,6 +473,10 @@ - alpha*-*-linux-gnu*) targ_emul=elf64alpha targ_extra_emuls=alpha - tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` - ;; -+alpha*-*-linux-uclibc*) targ_emul=elf64alpha targ_extra_emuls=alpha -+ # The following needs to be checked... -+ tdir_alpha=`echo ${targ_alias} | sed -e 's/linux/linuxecoff/'` -+ ;; - alpha*-*-osf*) targ_emul=alpha ;; - alpha*-*-gnu*) targ_emul=elf64alpha ;; - alpha*-*-netware*) targ_emul=alpha ;; -diff -urN binutils-2.15.90.0.1.1-dist/libtool.m4 binutils-2.15.90.0.1.1/libtool.m4 ---- binutils-2.15.90.0.1.1-dist/libtool.m4 2003-05-05 16:46:46.000000000 -0500 -+++ binutils-2.15.90.0.1.1/libtool.m4 2004-08-06 17:29:55.000000000 -0500 -@@ -645,6 +645,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'] -diff -urN binutils-2.15.90.0.1.1-dist/ltconfig binutils-2.15.90.0.1.1/ltconfig ---- binutils-2.15.90.0.1.1-dist/ltconfig 2004-01-14 15:07:42.000000000 -0600 -+++ binutils-2.15.90.0.1.1/ltconfig 2004-08-06 17:29:55.000000000 -0500 -@@ -603,6 +603,7 @@ - # Transform linux* to *-*-linux-gnu*, to support old configure scripts. - case $host_os in - linux-gnu*) ;; -+linux-uclibc*) ;; - linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'` - esac - -@@ -1259,6 +1260,24 @@ - dynamic_linker='GNU/Linux ld.so' - ;; - -+linux-uclibc*) -+ version_type=linux -+ need_lib_prefix=no -+ need_version=no -+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so' -+ soname_spec='${libname}${release}.so$major' -+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' -+ shlibpath_var=LD_LIBRARY_PATH -+ shlibpath_overrides_runpath=no -+ # This implies no fast_install, which is unacceptable. -+ # Some rework will be needed to allow for fast_install -+ # before this can be enabled. -+ # Note: copied from linux-gnu, and may not be appropriate. -+ hardcode_into_libs=yes -+ # Assume using the uClibc dynamic linker. -+ dynamic_linker="uClibc ld.so" -+ ;; -+ - netbsd*) - need_lib_prefix=no - need_version=no -diff -urN binutils-2.15.90.0.1.1-dist/opcodes/configure binutils-2.15.90.0.1.1/opcodes/configure ---- binutils-2.15.90.0.1.1-dist/opcodes/configure 2004-01-14 15:07:54.000000000 -0600 -+++ binutils-2.15.90.0.1.1/opcodes/configure 2004-08-06 17:29:55.000000000 -0500 -@@ -1689,6 +1689,11 @@ - lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` - ;; - -+linux-uclibc*) -+ lt_cv_deplibs_check_method=pass_all -+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so` -+ ;; -+ - netbsd*) - if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$' diff --git a/sys-devel/binutils/files/binutils-2.14.amd64-32bit-path-fix.patch b/sys-devel/binutils/files/binutils-2.14.amd64-32bit-path-fix.patch deleted file mode 100644 index d0b2e11ef2ab..000000000000 --- a/sys-devel/binutils/files/binutils-2.14.amd64-32bit-path-fix.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -ruN binutils-2.14.90.0.6.old/ld/emulparams/elf_i386.sh binutils-2.14.90.0.6/ld/emulparams/elf_i386.sh ---- binutils-2.14.90.0.6.old/ld/emulparams/elf_i386.sh 2003-07-23 11:08:12.000000000 -0400 -+++ binutils-2.14.90.0.6/ld/emulparams/elf_i386.sh 2003-09-29 14:23:21.252678192 -0400 -@@ -11,3 +11,11 @@ - GENERATE_SHLIB_SCRIPT=yes - GENERATE_PIE_SCRIPT=yes - NO_SMALL_DATA=yes -+ -+case "$target" in -+ x86_64*-linux*) -+ LIBPATH_SUFFIX=32 -+ ;; -+esac -+ -+ diff --git a/sys-devel/binutils/files/libiberty-pic.patch b/sys-devel/binutils/files/libiberty-pic.patch deleted file mode 100644 index 214c44bc4b2b..000000000000 --- a/sys-devel/binutils/files/libiberty-pic.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- libiberty/Makefile.in.mps 2004-05-13 15:53:17.000000000 +0200 -+++ libiberty/Makefile.in 2004-05-13 15:52:53.000000000 +0200 -@@ -224,6 +224,7 @@ $(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA - $(AR) $(AR_FLAGS) $(TARGETLIB) \ - $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \ - $(RANLIB) $(TARGETLIB); \ -+ cp $(TARGETLIB) ../ ; \ - cd ..; \ - else true; fi - |