summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2004-10-20 16:03:44 +0000
committerMike Frysinger <vapier@gentoo.org>2004-10-20 16:03:44 +0000
commit80e50e7ce0fb1a678319a3984491c5cf1451687e (patch)
tree158844f98d55eab349b445df1f2e4cb725eafba9 /sys-devel
parentFixed the digests, and added dspam-web-3.2_rc3 (diff)
downloadhistorical-80e50e7ce0fb1a678319a3984491c5cf1451687e.tar.gz
historical-80e50e7ce0fb1a678319a3984491c5cf1451687e.tar.bz2
historical-80e50e7ce0fb1a678319a3984491c5cf1451687e.zip
remove unused fat patches
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/binutils/Manifest10
-rw-r--r--sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie.patch632
-rw-r--r--sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch882
3 files changed, 4 insertions, 1520 deletions
diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 62174854f1e8..e8261ae78f07 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -38,11 +38,11 @@ MD5 c013cc4711373f43cb426e8b08d69ae1 files/2.13/binutils-2.13.90.0.18-testsuite-
MD5 feebd067c397d519e1ca9340606968a8 files/2.13/binutils-2.13.90.0.20-array-sects-compat.patch 1054
MD5 c98edbd5a87f00832a367a40a6e576d1 files/2.14/binutils-2.14.90.0.1-eh-frame-ro.patch 17942
MD5 e941bf2e41367989d389e2988672f87a files/2.14/binutils-2.14.90.0.1-sparc-nonpic.patch 3147
+MD5 1835ff629b956356a771fb7146d828c3 files/2.14/binutils-2.14.90.0.6-conf.patch 25485
MD5 04ed3642c4bebee3fe6de9e9e6e2f23b files/2.14/binutils-2.14.90.0.4-eh-frame-ro.patch 16503
MD5 60ff948d89725566178e8149375c3f31 files/2.14/binutils-2.14.90.0.4-gas-execstack.patch 3379
MD5 69161dd93a78ddede56256e0de28d282 files/2.14/binutils-2.14.90.0.4-gas-pred.patch 1104
MD5 fed0711b95edc0c64ee93ccfbc8e6268 files/2.14/binutils-2.14.90.0.4-ltconfig-multilib.patch 878
-MD5 ee0529757cf72b4d4f8c30733cda49c7 files/2.14/binutils-2.14.90.0.4-pie.patch 24448
MD5 3793ff770ff2fca80a2238f8de0a165e files/2.14/binutils-2.14.90.0.4-pie2.patch 1011
MD5 4aa97425036b8c3fb98975ab06cab3ae files/2.14/binutils-2.14.90.0.4-pni.patch 16030
MD5 b42bde8fcae8815f106b6c1f78e68134 files/2.14/binutils-2.14.90.0.4-ppc-bigplt.patch 628
@@ -62,7 +62,6 @@ MD5 d5afbb421242988c33551fdb2054581b files/2.14/binutils-2.14.90.0.5-s390-pie.pa
MD5 16fb9c43491e0ce0d22c9cba008ca983 files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-3.patch 637
MD5 2bc2ff3c3e1b608f1c3776246a5000c1 files/2.14/binutils-2.14.90.0.6-bfd-elf-interp-4.patch 1284
MD5 f9b9a43d7cd42c79b7f8144c6611f31c files/2.14/binutils-2.14.90.0.6-bfd-elf-interp.patch 391
-MD5 951847a76c7f1ad39d4eb7eeff4b9ca2 files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch 24221
MD5 559bf684bf26c292862d4287f047111c files/2.14/binutils-2.14.90.0.6-dont-crash-on-null-owner.patch 822
MD5 e3d1a3d9743bd5831241af6920bef2ee files/2.14/binutils-2.14.90.0.6-eh-frame-ro-2.patch 14702
MD5 09de3fa664f792872af4d6a029909315 files/2.14/binutils-2.14.90.0.6-eh-frame-ro.patch 14503
@@ -79,7 +78,6 @@ MD5 03d6c934577cf40ec75b41bfc38b48a0 files/2.14/binutils-mips-openssl-got-fix.pa
MD5 a911368168c533afc8a3292b66558b03 files/2.14/binutils-2.14.90.0.7-bfd-pt-gnu-segment-fix.patch 1130
MD5 37856b4142539ef22682d43cf880a0bf files/2.14/binutils-2.14.90.0.6-build_modules.patch 939
MD5 f2b54c4e03c2df44407beec56efbc2bd files/2.14/binutils-2.14.90.0.6-cflags.patch 1645
-MD5 1835ff629b956356a771fb7146d828c3 files/2.14/binutils-2.14.90.0.6-conf.patch 25485
MD5 8dfe15fc6599a60b3330ab9fdabaf60f files/2.14/binutils-2.14.90.0.6-debian.patch 7090
MD5 907ce8c972e2a984590d4bfc04181c1d files/2.15/40_all_binutils-uclibc-linker.patch 530
MD5 bad6ba9f63eb3a86d7006191848a47b8 files/2.15/52_all_binutils-20040527-uclibc-100-conf.patch 21576
@@ -87,7 +85,7 @@ MD5 8f619fc0c409a5ba768f126f172ee6bc files/2.15/05_all_binutils-2.15-elf32-arm-t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.9.10 (GNU/Linux)
-iD8DBQFBdomJHTu7gpaalycRAifIAJ9PXouhwZbmkcFW42CJ2ZL3M0kywwCgpbd8
-fiCjeVqOHl4f+xlNV+YmHfU=
-=urbS
+iD8DBQFBdox3HTu7gpaalycRAneYAJ97mBCM8opRItdLP/kCR9xNWhsIMwCg+vTK
+MrrIw9hR0wyZ7UyPZJTEBc8=
+=NkO4
-----END PGP SIGNATURE-----
diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie.patch
deleted file mode 100644
index 5d1cf56a4bc6..000000000000
--- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.4-pie.patch
+++ /dev/null
@@ -1,632 +0,0 @@
-2003-05-29 Ulrich Drepper <drepper@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
-bfd/
- * elflink.h (elf_link_add_object_symbols): Use !info->executable
- instead of info->shared where appropriate.
- (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
- * elflink.c (_bfd_elf_create_got_section): Likewise.
- (_bfd_elf_link_create_dynamic_sections): Likewise.
- (_bfd_elf_link_assign_sym_version): Likewise.
- * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
- and DT_DEBUG dynamic tag even for position independent executables.
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
- * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
- * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
- * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
- * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
- * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
- * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
- * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
-include/
- * bfdlink.h (struct bfd_link_info): Add pie and executable
- bits.
-ld/
- * lexsup.c (OPTION_PIE): Define.
- (ld_options): Add -pie and --pic-executable options.
- (parse_args): Handle OPTION_PIE.
- * ldmain.c (main): Initialize link_info.pie and
- link_info.executable.
- * genscripts.sh: Generate PIE scripts.
- * ld.texinfo: Document -pie and --pic-executable options.
- * emultempl/elf32.em (gld${EMULATION_NAME}_after_open):
- (gld${EMULATION_NAME}_place_orphan): Likewise.
- (gld${EMULATION_NAME}_get_script): Include PIE scripts.
- * scripttempl/elf.sc: In PIE scripts set . the same way as in
- shared scripts.
- * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Set to yes.
- * emulparams/elf64_ia64.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf32ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64ppc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_x86_64.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf32_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64_sparc.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64alpha.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf64_s390.sh (GENERATE_PIE_SCRIPT): Likewise.
- * emulparams/elf_i386.sh (GENERATE_PIE_SCRIPT): Likewise.
-
---- bfd/elf32-i386.c.jj 2003-05-23 10:18:52.000000000 -0400
-+++ bfd/elf32-i386.c 2003-05-28 03:18:13.000000000 -0400
-@@ -1797,7 +1797,7 @@ elf_i386_size_dynamic_sections (output_b
- if (htab->elf.dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- if (s == NULL)
-@@ -1963,7 +1963,7 @@ elf_i386_size_dynamic_sections (output_b
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (! info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elflink.h.jj 2003-05-23 10:18:52.000000000 -0400
-+++ bfd/elflink.h 2003-05-28 06:27:38.000000000 -0400
-@@ -474,7 +474,7 @@ elf_link_add_object_symbols (abfd, info)
- .gnu.warning.SYMBOL are treated as warning symbols for the given
- symbol. This differs from .gnu.warning sections, which generate
- warnings when they are included in an output file. */
-- if (! info->shared)
-+ if (info->executable)
- {
- asection *s;
-
-@@ -1321,7 +1321,7 @@ elf_link_add_object_symbols (abfd, info)
- }
- else
- new_flag = ELF_LINK_HASH_DEF_REGULAR;
-- if (info->shared
-+ if (! info->executable
- || (old_flags & (ELF_LINK_HASH_DEF_DYNAMIC
- | ELF_LINK_HASH_REF_DYNAMIC)) != 0)
- dynsym = TRUE;
-@@ -2174,7 +2174,7 @@ NAME(bfd_elf,size_dynamic_sections) (out
- if (bfd_get_section_by_name (output_bfd, ".preinit_array") != NULL)
- {
- /* DT_PREINIT_ARRAY is not allowed in shared library. */
-- if (info->shared)
-+ if (! info->executable)
- {
- bfd *sub;
- asection *o;
-@@ -2440,7 +2440,7 @@ NAME(bfd_elf,size_dynamic_sections) (out
-
- if (info->flags_1)
- {
-- if (! info->shared)
-+ if (info->executable)
- info->flags_1 &= ~ (DF_1_INITFIRST
- | DF_1_NODELETE
- | DF_1_NOOPEN);
-@@ -4417,7 +4417,8 @@ elf_link_output_extsym (h, data)
- referenced by regular files, because we will already have issued
- warnings for them. */
- if (! finfo->info->relocateable
-- && (! finfo->info->shared || ! finfo->info->allow_shlib_undefined)
-+ && (finfo->info->executable
-+ || ! finfo->info->allow_shlib_undefined)
- && h->root.type == bfd_link_hash_undefined
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
- && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0
---- bfd/elf32-ppc.c.jj 2003-05-23 10:18:52.000000000 -0400
-+++ bfd/elf32-ppc.c 2003-05-28 03:19:08.000000000 -0400
-@@ -2920,7 +2920,7 @@ ppc_elf_size_dynamic_sections (output_bf
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (htab->elf.dynobj, ".interp");
- BFD_ASSERT (s != NULL);
-@@ -3102,7 +3102,7 @@ ppc_elf_size_dynamic_sections (output_bf
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (!info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf32-s390.c.jj 2003-05-15 16:42:24.000000000 -0400
-+++ bfd/elf32-s390.c 2003-05-28 03:19:32.000000000 -0400
-@@ -1927,7 +1927,7 @@ elf_s390_size_dynamic_sections (output_b
- if (htab->elf.dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- if (s == NULL)
-@@ -2085,7 +2085,7 @@ elf_s390_size_dynamic_sections (output_b
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (! info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf64-ppc.c.jj 2003-05-23 10:18:52.000000000 -0400
-+++ bfd/elf64-ppc.c 2003-05-28 03:19:51.000000000 -0400
-@@ -5737,7 +5737,7 @@ ppc64_elf_size_dynamic_sections (output_
- if (htab->elf.dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- if (s == NULL)
-@@ -5936,7 +5936,7 @@ ppc64_elf_size_dynamic_sections (output_
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (!info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf64-s390.c.jj 2003-05-15 16:42:25.000000000 -0400
-+++ bfd/elf64-s390.c 2003-05-28 03:20:08.000000000 -0400
-@@ -1898,7 +1898,7 @@ elf_s390_size_dynamic_sections (output_b
- if (htab->elf.dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- if (s == NULL)
-@@ -2056,7 +2056,7 @@ elf_s390_size_dynamic_sections (output_b
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (! info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf64-x86-64.c.jj 2003-05-05 17:46:47.000000000 -0400
-+++ bfd/elf64-x86-64.c 2003-05-28 05:44:30.000000000 -0400
-@@ -1618,7 +1618,7 @@ elf64_x86_64_size_dynamic_sections (outp
- if (htab->elf.dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- if (s == NULL)
-@@ -1779,7 +1779,7 @@ elf64_x86_64_size_dynamic_sections (outp
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (! info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elfxx-ia64.c.jj 2003-05-15 16:42:25.000000000 -0400
-+++ bfd/elfxx-ia64.c 2003-05-28 03:24:40.000000000 -0400
-@@ -2903,7 +2903,7 @@ elfNN_ia64_size_dynamic_sections (output
-
- /* Set the contents of the .interp section to the interpreter. */
- if (ia64_info->root.dynamic_sections_created
-- && !info->shared)
-+ && info->executable)
- {
- sec = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (sec != NULL);
-@@ -3078,7 +3078,7 @@ elfNN_ia64_size_dynamic_sections (output
- later (in finish_dynamic_sections) but we must add the entries now
- so that we get the correct size for the .dynamic section. */
-
-- if (!info->shared)
-+ if (info->executable)
- {
- /* The DT_DEBUG entry is filled in by the dynamic linker and used
- by the debugger. */
---- bfd/elf32-sparc.c.jj 2003-05-28 03:03:45.000000000 -0400
-+++ bfd/elf32-sparc.c 2003-05-28 03:20:48.000000000 -0400
-@@ -1820,7 +1820,7 @@ elf32_sparc_size_dynamic_sections (outpu
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
-@@ -1997,7 +1997,7 @@ elf32_sparc_size_dynamic_sections (outpu
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (!info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf64-alpha.c.jj 2003-05-15 16:42:25.000000000 -0400
-+++ bfd/elf64-alpha.c 2003-05-28 03:21:20.000000000 -0400
-@@ -4090,7 +4090,7 @@ elf64_alpha_size_dynamic_sections (outpu
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (!info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
-@@ -4176,7 +4176,7 @@ elf64_alpha_size_dynamic_sections (outpu
- #define add_dynamic_entry(TAG, VAL) \
- bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
-
-- if (!info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elf64-sparc.c.jj 2003-05-28 03:03:45.000000000 -0400
-+++ bfd/elf64-sparc.c 2003-05-28 03:21:59.000000000 -0400
-@@ -1781,7 +1781,7 @@ sparc64_elf_size_dynamic_sections (outpu
- if (elf_hash_table (info)->dynamic_sections_created)
- {
- /* Set the contents of the .interp section to the interpreter. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_get_section_by_name (dynobj, ".interp");
- BFD_ASSERT (s != NULL);
-@@ -1880,7 +1880,7 @@ sparc64_elf_size_dynamic_sections (outpu
- struct elf_strtab_hash *dynstr;
- struct elf_link_hash_table *eht = elf_hash_table (info);
-
-- if (!info->shared)
-+ if (info->executable)
- {
- if (!add_dynamic_entry (DT_DEBUG, 0))
- return FALSE;
---- bfd/elflink.c.jj 2003-05-23 10:18:52.000000000 -0400
-+++ bfd/elflink.c 2003-05-28 06:20:40.000000000 -0400
-@@ -94,7 +94,7 @@ _bfd_elf_create_got_section (abfd, info)
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
-- if (info->shared
-+ if (! info->executable
- && ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-
-@@ -144,7 +144,7 @@ _bfd_elf_link_create_dynamic_sections (a
-
- /* A dynamically linked executable has a .interp section, but a
- shared library does not. */
-- if (! info->shared)
-+ if (info->executable)
- {
- s = bfd_make_section (abfd, ".interp");
- if (s == NULL
-@@ -227,7 +227,7 @@ _bfd_elf_link_create_dynamic_sections (a
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
-- if (info->shared
-+ if (! info->executable
- && ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
-
-@@ -295,7 +295,7 @@ _bfd_elf_create_dynamic_sections (abfd,
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
-
-- if (info->shared
-+ if (! info->executable
- && ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return FALSE;
- }
-@@ -1760,7 +1760,7 @@ _bfd_elf_link_assign_sym_version (h, dat
-
- /* If we are building an application, we need to create a
- version node for this version. */
-- if (t == NULL && ! info->shared)
-+ if (t == NULL && info->executable)
- {
- struct bfd_elf_version_tree **pp;
- int version_index;
---- include/bfdlink.h.jj 2003-05-23 10:18:54.000000000 -0400
-+++ include/bfdlink.h 2003-05-28 03:15:38.000000000 -0400
-@@ -291,6 +291,12 @@ struct bfd_link_info
- /* TRUE if relaxation is being finalized. */
- unsigned int relax_finalizing: 1;
-
-+ /* TRUE if generating a position independent executable. */
-+ unsigned int pie: 1;
-+
-+ /* TRUE if generating an executable, position independent or not. */
-+ unsigned int executable : 1;
-+
- /* Which symbols to strip. */
- enum bfd_link_strip strip;
-
---- ld/emulparams/elf_i386.sh.jj 2002-03-07 14:52:39.000000000 -0500
-+++ ld/emulparams/elf_i386.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -9,4 +9,5 @@ MACHINE=
- NOP=0x90909090
- TEMPLATE_NAME=elf32
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- NO_SMALL_DATA=yes
---- ld/emulparams/elf64_ia64.sh.jj 2003-05-15 16:42:25.000000000 -0400
-+++ ld/emulparams/elf64_ia64.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -16,6 +16,7 @@ fi
- TEXT_START_ADDR="0x4000000000000000"
- DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- NOP=0x00300000010070000002000001000400 # a bundle full of nops
- OTHER_GOT_SECTIONS="
- .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
---- ld/emulparams/elf32ppc.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/emulparams/elf32ppc.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -4,6 +4,7 @@
- TEMPLATE_NAME=elf32
- EXTRA_EM_FILE=ppc32elf
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- SCRIPT_NAME=elf
- OUTPUT_FORMAT="elf32-powerpc"
- TEXT_START_ADDR=0x01800000
---- ld/emulparams/elf64ppc.sh.jj 2003-01-21 13:21:34.000000000 -0500
-+++ ld/emulparams/elf64ppc.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -2,6 +2,7 @@ TEMPLATE_NAME=elf32
- EXTRA_EM_FILE=ppc64elf
- ELFSIZE=64
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- SCRIPT_NAME=elf
- OUTPUT_FORMAT="elf64-powerpc"
- TEXT_START_ADDR=0x10000000
---- ld/emulparams/elf_x86_64.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/emulparams/elf_x86_64.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -10,6 +10,7 @@ MACHINE=
- NOP=0x90909090
- TEMPLATE_NAME=elf32
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- NO_SMALL_DATA=yes
-
- if [ "x${host}" = "x${target}" ]; then
---- ld/emulparams/elf_s390.sh.jj 2002-03-07 14:52:39.000000000 -0500
-+++ ld/emulparams/elf_s390.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -8,3 +8,4 @@ MACHINE=
- NOP=0x07070707
- TEMPLATE_NAME=elf32
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
---- ld/emulparams/elf64_sparc.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/emulparams/elf64_sparc.sh 2003-05-28 03:30:35.000000000 -0400
-@@ -8,6 +8,7 @@ ARCH="sparc:v9"
- MACHINE=
- DATA_PLT=
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- NOP=0x01000000
- NO_SMALL_DATA=yes
-
---- ld/emulparams/elf32_sparc.sh.jj 2002-03-07 14:52:39.000000000 -0500
-+++ ld/emulparams/elf32_sparc.sh 2003-05-28 03:30:49.000000000 -0400
-@@ -10,4 +10,5 @@ MACHINE=
- TEMPLATE_NAME=elf32
- DATA_PLT=
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- NO_SMALL_DATA=yes
---- ld/emulparams/elf64alpha.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/emulparams/elf64alpha.sh 2003-05-28 03:31:11.000000000 -0400
-@@ -11,6 +11,7 @@ NONPAGED_TEXT_START_ADDR="0x120000000"
- ARCH=alpha
- MACHINE=
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
- DATA_PLT=
- # Note that the number is always big-endian, thus we have to
- # reverse the digit string.
---- ld/emulparams/elf64_s390.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/emulparams/elf64_s390.sh 2003-05-28 03:31:25.000000000 -0400
-@@ -9,6 +9,7 @@ MACHINE=
- NOP=0x07070707
- TEMPLATE_NAME=elf32
- GENERATE_SHLIB_SCRIPT=yes
-+GENERATE_PIE_SCRIPT=yes
-
- # Treat a host that matches the target with the possible exception of "x"
- # in the name as if it were native.
---- ld/emultempl/elf32.em.jj 2003-05-28 03:03:45.000000000 -0400
-+++ ld/emultempl/elf32.em 2003-05-28 05:37:00.000000000 -0400
-@@ -643,7 +643,7 @@ gld${EMULATION_NAME}_after_open ()
- struct bfd_link_needed_list *needed, *l;
-
- /* We only need to worry about this when doing a final link. */
-- if (link_info.relocateable || link_info.shared)
-+ if (link_info.relocateable || !link_info.executable)
- return;
-
- /* Get the list of files which appear in DT_NEEDED entries in
-@@ -1181,7 +1181,7 @@ gld${EMULATION_NAME}_place_orphan (file,
-
- /* If this is a final link, then always put .gnu.warning.SYMBOL
- sections into the .text section to get them out of the way. */
-- if (! link_info.shared
-+ if (link_info.executable
- && ! link_info.relocateable
- && strncmp (secname, ".gnu.warning.", sizeof ".gnu.warning." - 1) == 0
- && hold_text.os != NULL)
-@@ -1475,6 +1475,14 @@ if cmp -s ldscripts/${EMULATION_NAME}.x
- echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
- sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
- fi
-+if test -n "$GENERATE_PIE_SCRIPT" ; then
-+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-+echo ' ; else if (link_info.pie && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-+sed $sc ldscripts/${EMULATION_NAME}.xdc >> e${EMULATION_NAME}.c
-+fi
-+echo ' ; else if (link_info.pie) return' >> e${EMULATION_NAME}.c
-+sed $sc ldscripts/${EMULATION_NAME}.xd >> e${EMULATION_NAME}.c
-+fi
- if test -n "$GENERATE_SHLIB_SCRIPT" ; then
- if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
- echo ' ; else if (link_info.shared && link_info.combreloc) return' >> e${EMULATION_NAME}.c
-@@ -1512,6 +1520,18 @@ cat >>e${EMULATION_NAME}.c <<EOF
- return "ldscripts/${EMULATION_NAME}.xn";
- EOF
- fi
-+if test -n "$GENERATE_PIE_SCRIPT" ; then
-+if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
-+cat >>e${EMULATION_NAME}.c <<EOF
-+ else if (link_info.pie && link_info.combreloc)
-+ return "ldscripts/${EMULATION_NAME}.xdc";
-+EOF
-+fi
-+cat >>e${EMULATION_NAME}.c <<EOF
-+ else if (link_info.pie)
-+ return "ldscripts/${EMULATION_NAME}.xd";
-+EOF
-+fi
- if test -n "$GENERATE_SHLIB_SCRIPT" ; then
- if test -n "$GENERATE_COMBRELOC_SCRIPT" ; then
- cat >>e${EMULATION_NAME}.c <<EOF
---- ld/scripttempl/elf.sc.jj 2003-05-28 03:03:45.000000000 -0400
-+++ ld/scripttempl/elf.sc 2003-05-28 03:15:38.000000000 -0400
-@@ -180,8 +180,9 @@ ${RELOCATING- /* For some reason, the So
- SECTIONS
- {
- /* Read-only sections, merged into text segment: */
-- ${CREATE_SHLIB-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}}
-+ ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+. = ${TEXT_BASE_ADDRESS};}}}
- ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
-+ ${CREATE_PIE+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR:-0} + SIZEOF_HEADERS;}}
- ${CREATE_SHLIB-${INTERP}}
- ${INITIAL_READONLY_SECTIONS}
- ${TEXT_DYNAMIC+${DYNAMIC}}
---- ld/lexsup.c.jj 2003-05-15 16:42:25.000000000 -0400
-+++ ld/lexsup.c 2003-05-28 03:15:38.000000000 -0400
-@@ -139,6 +139,7 @@ int parsing_defsym = 0;
- #define OPTION_NO_STRIP_DISCARDED (OPTION_STRIP_DISCARDED + 1)
- #define OPTION_ACCEPT_UNKNOWN_INPUT_ARCH (OPTION_NO_STRIP_DISCARDED + 1)
- #define OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH (OPTION_ACCEPT_UNKNOWN_INPUT_ARCH + 1)
-+#define OPTION_PIE (OPTION_NO_ACCEPT_UNKNOWN_INPUT_ARCH + 1)
-
- /* The long options. This structure is used for both the option
- parsing and the help text. */
-@@ -373,6 +374,10 @@ static const struct ld_option ld_options
- '\0', NULL, N_("Create a shared library"), ONE_DASH },
- { {"Bshareable", no_argument, NULL, OPTION_SHARED }, /* FreeBSD. */
- '\0', NULL, NULL, ONE_DASH },
-+ { {"pie", no_argument, NULL, OPTION_PIE},
-+ '\0', NULL, N_("Create a position independent executable"), ONE_DASH },
-+ { {"pic-executable", no_argument, NULL, OPTION_PIE},
-+ '\0', NULL, NULL, TWO_DASHES },
- { {"sort-common", no_argument, NULL, OPTION_SORT_COMMON},
- '\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
- { {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
-@@ -958,6 +961,15 @@ parse_args (argc, argv)
- else
- einfo (_("%P%F: -shared not supported\n"));
- break;
-+ case OPTION_PIE:
-+ if (config.has_shared)
-+ {
-+ link_info.shared = TRUE;
-+ link_info.pie = TRUE;
-+ }
-+ else
-+ einfo (_("%P%F: -pie not supported\n"));
-+ break;
- case 'h': /* Used on Solaris. */
- case OPTION_SONAME:
- command_line.soname = optarg;
---- ld/genscripts.sh.jj 2003-03-19 12:19:16.000000000 -0500
-+++ ld/genscripts.sh 2003-05-28 03:15:38.000000000 -0400
-@@ -227,6 +227,31 @@ if test -n "$GENERATE_SHLIB_SCRIPT"; the
- rm -f ${COMBRELOC}
- COMBRELOC=
- fi
-+ unset CREATE_SHLIB
-+fi
-+
-+if test -n "$GENERATE_PIE_SCRIPT"; then
-+ LD_FLAG=pie
-+ DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
-+ CREATE_PIE=" "
-+ # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
-+ (
-+ echo "/* Script for ld -pie: link position independent executable */"
-+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
-+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xd
-+ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
-+ LD_FLAG=cpie
-+ DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
-+ COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
-+ ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
-+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
-+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
-+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xdc
-+ rm -f ${COMBRELOC}
-+ COMBRELOC=
-+ fi
-+ unset CREATE_PIE
- fi
-
- case " $EMULATION_LIBPATH " in
---- ld/ldmain.c.jj 2003-05-15 16:42:25.000000000 -0400
-+++ ld/ldmain.c 2003-05-28 03:15:38.000000000 -0400
-@@ -291,6 +291,8 @@ main (argc, argv)
- link_info.emitrelocations = FALSE;
- link_info.task_link = FALSE;
- link_info.shared = FALSE;
-+ link_info.pie = FALSE;
-+ link_info.executable = FALSE;
- link_info.symbolic = FALSE;
- link_info.export_dynamic = FALSE;
- link_info.static_link = FALSE;
-@@ -368,6 +370,9 @@ main (argc, argv)
- einfo (_("%P%F: -f may not be used without -shared\n"));
- }
-
-+ if (! link_info.shared || link_info.pie)
-+ link_info.executable = TRUE;
-+
- /* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
- don't see how else this can be handled, since in this case we
- must preserve all externally visible symbols. */
---- ld/ld.texinfo.jj 2003-05-05 17:46:49.000000000 -0400
-+++ ld/ld.texinfo 2003-05-29 07:35:25.000000000 -0400
-@@ -1209,6 +1209,18 @@ command @code{OUTPUT_FORMAT} can also sp
- this option overrides it. @xref{BFD}.
- @end ifclear
-
-+@kindex -pie
-+@kindex --pic-executable
-+@item -pie
-+@itemx --pic-executable
-+@cindex position independent executables
-+Create a position independent executable. This is currently only supported on
-+ELF platforms. Position independent executables are similar to shared
-+libraries in that they are relocated by the dynamic linker to the virtual
-+address OS chooses for them (which can varry between invocations), like
-+normal dynamically linked executables they can be executed and symbols
-+defined in the executable cannot be overridden by shared libraries.
-+
- @kindex -qmagic
- @item -qmagic
- This option is ignored for Linux compatibility.
diff --git a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch b/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch
deleted file mode 100644
index 9ae5d51e223c..000000000000
--- a/sys-devel/binutils/files/2.14/binutils-2.14.90.0.6-cxx-speedup.patch
+++ /dev/null
@@ -1,882 +0,0 @@
-*** ./ld/mri.c 2003-07-23 12:08:12.000000000 -0300
---- ./ld/mri.c.new 2003-09-04 11:44:00.000000000 -0300
-***************
-*** 227,232 ****
---- 227,233 ----
- tmp->spec.name = p->name;
- tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
-+ tmp->spec.wildcard_p = wildcardp( p->name );
- lang_add_wild (NULL, tmp, FALSE);
-
- /* If there is an alias for this section, add it too. */
-***************
-*** 238,243 ****
---- 239,245 ----
- tmp->spec.name = aptr->name;
- tmp->spec.exclude_name_list = NULL;
- tmp->spec.sorted = FALSE;
-+ tmp->spec.wildcard_p = wildcardp( aptr->name );
- lang_add_wild (NULL, tmp, FALSE);
- }
-
-*** ./ld/ld.h 2003-07-23 12:08:12.000000000 -0300
---- ./ld/ld.h.new 2003-09-04 11:59:57.000000000 -0300
-***************
-*** 71,76 ****
---- 71,77 ----
- const char *name;
- struct name_list *exclude_name_list;
- bfd_boolean sorted;
-+ bfd_boolean wildcard_p;
- };
-
- struct wildcard_list {
-*** ./ld/ldgram.y 2003-08-21 12:28:48.000000000 -0300
---- ./ld/ldgram.y.new 2003-09-04 11:58:56.000000000 -0300
-***************
-*** 411,434 ****
---- 411,438 ----
- $$.name = $1;
- $$.sorted = FALSE;
- $$.exclude_name_list = NULL;
-+ $$.wildcard_p = wildcardp($1);
- }
- | EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name
- {
- $$.name = $5;
- $$.sorted = FALSE;
- $$.exclude_name_list = $3;
-+ $$.wildcard_p = wildcardp($5);
- }
- | SORT '(' wildcard_name ')'
- {
- $$.name = $3;
- $$.sorted = TRUE;
- $$.exclude_name_list = NULL;
-+ $$.wildcard_p = wildcardp($3);
- }
- | SORT '(' EXCLUDE_FILE '(' exclude_name_list ')' wildcard_name ')'
- {
- $$.name = $7;
- $$.sorted = TRUE;
- $$.exclude_name_list = $5;
-+ $$.wildcard_p = wildcardp($7);
- }
- ;
-
-***************
-*** 479,484 ****
---- 483,489 ----
- tmp.name = $1;
- tmp.exclude_name_list = NULL;
- tmp.sorted = FALSE;
-+ tmp.wildcard_p = wildcardp($1);
- lang_add_wild (&tmp, NULL, ldgram_had_keep);
- }
- | '[' file_NAME_list ']'
-*** ./ld/ldlang.c 2003-08-21 12:28:48.000000000 -0300
---- ./ld/ldlang.c.new 2003-09-04 11:56:26.000000000 -0300
-***************
-*** 63,69 ****
-
- /* Forward declarations. */
- static void exp_init_os (etree_type *);
-- static bfd_boolean wildcardp (const char *);
- static lang_input_statement_type *lookup_name (const char *);
- static bfd_boolean load_symbols (lang_input_statement_type *,
- lang_statement_list_type *);
---- 63,68 ----
-***************
-*** 191,197 ****
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
-
-! if (wildcardp (sec->spec.name))
- skip = fnmatch (sec->spec.name, sname, 0) != 0;
- else
- skip = strcmp (sec->spec.name, sname) != 0;
---- 190,196 ----
- {
- const char *sname = bfd_get_section_name (file->the_bfd, s);
-
-! if ( sec->spec.wildcard_p )
- skip = fnmatch (sec->spec.name, sname, 0) != 0;
- else
- skip = strcmp (sec->spec.name, sname) != 0;
-***************
-*** 954,960 ****
- be enough to cause the pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-
-! static bfd_boolean
- wildcardp (const char *pattern)
- {
- const char *s;
---- 953,959 ----
- be enough to cause the pattern to be treated as a wildcard.
- That lets us handle DOS filenames more naturally. */
-
-! bfd_boolean
- wildcardp (const char *pattern)
- {
- const char *s;
-***************
-*** 4182,4191 ****
-
- if (filespec != NULL && filespec->name != NULL)
- {
-! if (strcmp (filespec->name, "*") == 0)
- filespec->name = NULL;
-! else if (! wildcardp (filespec->name))
-! lang_has_input_file = TRUE;
- }
-
- new = new_stat (lang_wild_statement, stat_ptr);
---- 4181,4192 ----
-
- if (filespec != NULL && filespec->name != NULL)
- {
-!
-! if (strcmp (filespec->name, "*") == 0) {
-! filespec->wildcard_p = FALSE;
- filespec->name = NULL;
-! } else if (! filespec->wildcard_p )
-! lang_has_input_file = TRUE;
- }
-
- new = new_stat (lang_wild_statement, stat_ptr);
-*** ./ld/ldlang.h 2003-08-21 12:28:48.000000000 -0300
---- ./ld/ldlang.h.new 2003-09-04 11:51:29.000000000 -0300
-***************
-*** 407,412 ****
---- 407,414 ----
- (const char *);
- extern void lang_add_wild
- (struct wildcard_spec *, struct wildcard_list *, bfd_boolean);
-+ extern bfd_boolean wildcardp
-+ PARAMS ((const char *));
- extern void lang_add_map
- (const char *);
- extern void lang_add_fill
-*** ./bfd/elflink.h 2003-08-21 12:28:48.000000000 -0300
---- ./bfd/elflink.h.new 2003-09-04 13:12:40.000000000 -0300
-***************
-*** 1488,1500 ****
- assembler code, handling it correctly would be very time
- consuming, and other ELF linkers don't handle general aliasing
- either. */
- while (weaks != NULL)
- {
- struct elf_link_hash_entry *hlook;
- asection *slook;
- bfd_vma vlook;
-! struct elf_link_hash_entry **hpp;
-! struct elf_link_hash_entry **hppend;
-
- hlook = weaks;
- weaks = hlook->weakdef;
---- 1488,1539 ----
- assembler code, handling it correctly would be very time
- consuming, and other ELF linkers don't handle general aliasing
- either. */
-+ {
-+ #define HASH(h) (((h->root.u.def.value >> 3) ^ \
-+ (h->root.u.def.section->target_index<<10))%(4*extsymcount))
-+ struct hashentry {
-+ struct elf_link_hash_entry *h;
-+ struct hashentry *next;
-+ };
-+ struct hashentry *array;
-+ struct elf_link_hash_entry **hpp;
-+ struct elf_link_hash_entry **hppend;
-+
-+ array = (struct hashentry *) malloc(extsymcount*4*sizeof(struct hashentry));
-+ memset(array, 0, extsymcount*4*sizeof(struct hashentry));
-+
-+ hpp = elf_sym_hashes (abfd);
-+ hppend = hpp + extsymcount;
-+ for (; hpp < hppend; hpp++)
-+ {
-+ unsigned int hash;
-+ struct elf_link_hash_entry *h = *hpp;
-+
-+ if (!h || h->root.type != bfd_link_hash_defined)
-+ continue;
-+
-+ hash = HASH(h);
-+
-+ if (!array[hash].h) {
-+ array[hash].h = h;
-+ } else {
-+ struct hashentry *p = array + hash;
-+ while (p->next)
-+ p = p->next;
-+ p->next = (struct hashentry *) malloc(sizeof(struct hashentry));
-+ p->next->h = h;
-+ p->next->next = 0;
-+ }
-+ }
-+
-+
- while (weaks != NULL)
- {
- struct elf_link_hash_entry *hlook;
- asection *slook;
- bfd_vma vlook;
-! unsigned int hash;
-! struct hashentry *entry;
-
- hlook = weaks;
- weaks = hlook->weakdef;
-***************
-*** 1504,1525 ****
- || hlook->root.type == bfd_link_hash_defweak
- || hlook->root.type == bfd_link_hash_common
- || hlook->root.type == bfd_link_hash_indirect);
- slook = hlook->root.u.def.section;
- vlook = hlook->root.u.def.value;
-
-! hpp = elf_sym_hashes (abfd);
-! hppend = hpp + extsymcount;
-! for (; hpp < hppend; hpp++)
-! {
-! struct elf_link_hash_entry *h;
-!
-! h = *hpp;
-! if (h != NULL && h != hlook
-! && h->root.type == bfd_link_hash_defined
-! && h->root.u.def.section == slook
-! && h->root.u.def.value == vlook)
-! {
-! hlook->weakdef = h;
-
- /* If the weak definition is in the list of dynamic
- symbols, make sure the real definition is put there
---- 1543,1561 ----
- || hlook->root.type == bfd_link_hash_defweak
- || hlook->root.type == bfd_link_hash_common
- || hlook->root.type == bfd_link_hash_indirect);
-+ hash = HASH( hlook );
- slook = hlook->root.u.def.section;
- vlook = hlook->root.u.def.value;
-
-! entry = array + hash;
-! while (entry && entry->h)
-! {
-! struct elf_link_hash_entry *h = entry->h;
-! if (h != hlook
-! && h->root.u.def.section == slook
-! && h->root.u.def.value == vlook)
-! {
-! hlook->weakdef = h;
-
- /* If the weak definition is in the list of dynamic
- symbols, make sure the real definition is put there
-***************
-*** 1544,1549 ****
---- 1580,1600 ----
- }
- break;
- }
-+ entry = entry->next;
-+ }
-+ }
-+ {
-+ unsigned int i;
-+ for (i = 0; i < 4*extsymcount; ++i) {
-+ struct hashentry *h = array[i].next;
-+ while (h) {
-+ struct hashentry *n = h->next;
-+ free(h);
-+ h = n;
-+ }
-+ }
-+ free(array);
-+
- }
- }
-
-*** ./bfd/merge.c 2002-12-16 18:22:52.000000000 -0200
---- ./bfd/merge.c.new 2003-09-04 12:11:12.000000000 -0300
-***************
-*** 108,119 ****
- 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 bfd_boolean record_section
- PARAMS ((struct sec_merge_info *, struct sec_merge_sec_info *));
- static void merge_strings
---- 108,117 ----
- struct sec_merge_sec_info *));
- static bfd_boolean sec_merge_emit
- PARAMS ((bfd *, struct sec_merge_hash_entry *));
-!
-! static int strrevcmp 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
-***************
-*** 457,539 ****
- 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. */
---- 456,481 ----
- 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;
-+ const unsigned char *s = A->root.string + A->len - A->u.entsize;
-+ const unsigned char *t = B->root.string + B->len - B->u.entsize;
-+ int l = A->len < B->len ? A->len : B->len;
-+
-+ l -= (A->u.entsize - 1);
-+ while (l) {
-+ if (*s != *t)
-+ return (int)*s - (int)*t;
-+ s--;
-+ t--;
-+ l--;
-+ }
-+ return A->len - B->len;
-
- }
-
- /* Record one section into the hash table. */
-***************
-*** 620,625 ****
---- 562,581 ----
- return FALSE;
- }
-
-+ static 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 - 1 * A->u.entsize) == 0;
-+ }
-+
-+
- /* This is a helper function for _bfd_merge_sections. It attempts to
- merge strings matching suffixes of longer strings. */
- static void
-***************
-*** 628,637 ****
- {
- struct sec_merge_hash_entry **array, **a, **end, *e;
- struct sec_merge_sec_info *secinfo;
-- htab_t lasttab = NULL, last4tab = NULL;
- bfd_size_type size, amt;
-
-! /* Now sort the strings by length, longest first. */
- array = NULL;
- amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
- array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
---- 584,592 ----
- {
- struct sec_merge_hash_entry **array, **a, **end, *e;
- struct sec_merge_sec_info *secinfo;
- bfd_size_type size, amt;
-
-! /* Now sort the strings */
- array = NULL;
- amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
- array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
-***************
-*** 644,729 ****
-
- 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)
-! {
-! struct sec_merge_hash_entry *ent;
-
-- ent = (struct sec_merge_hash_entry *) *p;
-- e->u.suffix = ent;
-- e->alignment = 0;
-- continue;
-- }
-- 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;
- }
-- 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;
---- 599,644 ----
-
- sinfo->htab->size = a - array;
-
- for (a = array, end = array + sinfo->htab->size; a < end; a++)
- {
- e = *a;
- e->u.entsize = sinfo->htab->entsize;
-! }
-
-
-! qsort (array, (size_t) sinfo->htab->size,
-! sizeof (struct sec_merge_hash_entry *), strrevcmp);
-!
-! for (a = array, end = array + sinfo->htab->size; a < end; a++)
-! {
-! e = *a;
-! if (e->len <= e->u.entsize)
-! continue;
-! {
-! bfd_boolean found = FALSE;
-! struct sec_merge_hash_entry **b = a+1;
-! while (b < end)
-! {
-! struct sec_merge_hash_entry *cmp = *b;
-! if (!is_suffix(cmp, e))
-! break;
-! if (e->alignment >= cmp->alignment
-! && !((e->len - cmp->len) & (cmp->alignment - 1)))
-! /* The suffix is sufficiently aligned. */
-! {
-! e->u.suffix = cmp;
-! found = TRUE;
-! }
-! ++b;
-! }
-! if( found )
-! e->alignment = 0;
- }
- }
-
- alloc_failure:
- if (array)
- free (array);
-
- /* Now assign positions to the strings we want to keep. */
- size = 0;
-*** ./bfd/elf-strtab.c 2003-08-21 12:28:47.000000000 -0300
---- ./bfd/elf-strtab.c.new 2003-09-04 13:21:17.000000000 -0300
-***************
-*** 57,62 ****
---- 57,68 ----
- struct elf_strtab_hash_entry **array;
- };
-
-+ static int strrevcmp PARAMS ((const PTR, const PTR));
-+ static int is_suffix PARAMS ((const struct elf_strtab_hash_entry *,
-+ const struct elf_strtab_hash_entry *));
-+
-+
-+
- /* Routine to create an entry in a section merge hashtab. */
-
- static struct bfd_hash_entry *
-***************
-*** 253,284 ****
- return TRUE;
- }
-
-! /* Compare two elf_strtab_hash_entry structures. This is called via qsort. */
-!
-! static int
-! cmplengthentry (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;
-
-! 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 (const void *a, const void *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
---- 259,291 ----
- return TRUE;
- }
-
-! static int strrevcmp( a, b )
-! const PTR a;
-! const PTR 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;
-
-! const unsigned char *s = A->root.string + A->len - 1;
-! const unsigned char *t = B->root.string + B->len - 1;
-! int l = A->len < B->len ? A->len : B->len;
-!
-! while (l) {
-! if (*s != *t)
-! return (int)*s - (int)*t;
-! s--;
-! t--;
-! l--;
-! }
-! return A->len - B->len;
-
- }
-
-! static int is_suffix(A, B)
-! const struct elf_strtab_hash_entry *A;
-! const struct elf_strtab_hash_entry *B;
-
-! {
-
- if (A->len <= B->len)
- /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
-***************
-*** 286,292 ****
- return 0;
-
- return memcmp (A->root.string + (A->len - B->len),
-! B->root.string, B->len - 5) == 0;
- }
-
- /* This function assigns final string table offsets for used strings,
---- 291,297 ----
- return 0;
-
- return memcmp (A->root.string + (A->len - B->len),
-! B->root.string, B->len - 1) == 0;
- }
-
- /* This function assigns final string table offsets for used strings,
-***************
-*** 296,304 ****
- _bfd_elf_strtab_finalize (struct elf_strtab_hash *tab)
- {
- struct elf_strtab_hash_entry **array, **a, **end, *e;
-- htab_t last4tab = NULL;
- 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.
---- 301,307 ----
-***************
-*** 306,321 ****
- cycles. */
- size_t i;
-
-! /* Now sort the strings by length, longest first. */
- array = NULL;
- 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];
---- 309,321 ----
- cycles. */
- size_t i;
-
-! /* Now sort the strings */
- array = NULL;
- amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
- array = bfd_malloc (amt);
- if (array == NULL)
- goto alloc_failure;
-
- for (i = 1, a = array; i < tab->size; ++i)
- if (tab->array[i]->refcount)
- *a++ = tab->array[i];
-***************
-*** 324,403 ****
-
- size = a - array;
-
-! qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
-
-! last4tab = htab_create_alloc (size * 4, NULL, last4_eq, NULL, calloc, free);
-! if (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 + size; a < end; a++)
- {
-- register hashval_t hash;
-- unsigned int c;
-- unsigned int j;
-- const unsigned char *s;
-- void **p;
--
- 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;
-!
-! ent = *p;
-! e->u.suffix = ent;
-! e->len = 0;
- continue;
-- }
-- else
-- *p = e;
-- }
-- else
- {
-! struct elf_strtab_hash_entry *tem;
-!
-! 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)
-! {
-! e->u.suffix = tem;
- e->len = 0;
-- continue;
- }
- }
-
-- 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. */
- size = 1;
---- 324,358 ----
-
- size = a - array;
-
-! qsort (array, size, sizeof (struct elf_strtab_hash_entry *), strrevcmp);
-
-! /* now loop over the sorted array and merge suffixes */
- for (a = array, end = array + size; a < end; a++)
- {
- e = *a;
-! if( e->len <= 1 )
- continue;
- {
-! struct elf_strtab_hash_entry **b = a+1;
-! int found = 0;
-! while (b < end) {
-! struct elf_strtab_hash_entry *cmp = *b;
-! if (!is_suffix(cmp, e))
-
- break;
-! e->u.suffix = cmp;
-! found = 1;
-! ++b;
-! }
-! if( found )
- e->len = 0;
- }
- }
-
-
- alloc_failure:
- if (array)
- free (array);
-
- /* Now assign positions to the strings we want to keep. */
- size = 1;