]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
authorIan Lance Taylor <ian@airs.com>
Tue, 31 Dec 1996 19:46:37 +0000 (19:46 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 31 Dec 1996 19:46:37 +0000 (19:46 +0000)
filter_shlib and auxiliary_filter_shlib parameters.
* elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
DT_FILTER.
* bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
(bfd_elf64_size_dynamic_sections): Likewise.
* bfd-in2.h: Rebuild.

bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/elf.c
bfd/elflink.h

index a8a3372e6550911d27ef86154fee34980a13fc6f..971d7e6150b804a3213732bcbc9c8608a8de3588 100644 (file)
@@ -1,3 +1,13 @@
+Tue Dec 31 14:44:50 1996  Ian Lance Taylor  <ian@cygnus.com>
+
+       * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Add
+       filter_shlib and auxiliary_filter_shlib parameters.
+       * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_AUXILIARY and
+       DT_FILTER.
+       * bfd-in.h (bfd_elf32_size_dynamic_sections): Update declaration.
+       (bfd_elf64_size_dynamic_sections): Likewise.
+       * bfd-in2.h: Rebuild.
+
 Mon Dec 30 18:48:52 1996  Ian Lance Taylor  <ian@cygnus.com>
 
        * xcofflink.c (xcoff_build_ldsyms): When exporting all defined
index fadbd041ac219365681ebfed4cdfb3a2d3ab6038..7378e41aeb41dc7dd4a3f4d656515577ac02269c 100644 (file)
@@ -199,7 +199,7 @@ typedef enum bfd_format {
    to another, and are not necessarily correct).  */
 
 /* No flags.  */
-#define NO_FLAGS       0x00
+#define BFD_NO_FLAGS           0x00
 
 /* BFD contains relocation entries.  */
 #define HAS_RELOC      0x01
@@ -605,11 +605,11 @@ extern boolean bfd_elf64_record_link_assignment
 extern struct bfd_link_needed_list *bfd_elf_get_needed_list
   PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+          const char *, struct bfd_link_info *, struct sec **));
 extern boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+          const char *, struct bfd_link_info *, struct sec **));
 extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
 extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
 
index 2c1580791a49b576cb9c1d873ed6b79dc0017c04..d93a1f198ec5674ede41082b2abcd92093c412bd 100644 (file)
@@ -605,11 +605,11 @@ extern boolean bfd_elf64_record_link_assignment
 extern struct bfd_link_needed_list *bfd_elf_get_needed_list
   PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+          const char *, struct bfd_link_info *, struct sec **));
 extern boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, boolean,
-          struct bfd_link_info *, struct sec **));
+  PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+          const char *, struct bfd_link_info *, struct sec **));
 extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
 extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
 
index 0ea1bb836da22ed1d3bdc7524606eb002fbaa7ac..90c74ad2a54aed495f32d9d53f9f7c77069a8d68 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -473,6 +473,8 @@ _bfd_elf_print_private_bfd_data (abfd, farg)
            case DT_DEBUG: name = "DEBUG"; break;
            case DT_TEXTREL: name = "TEXTREL"; break;
            case DT_JMPREL: name = "JMPREL"; break;
+           case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break;
+           case DT_FILTER: name = "FILTER"; stringp = true; break;
            }
 
          fprintf (f, "  %-11s ", name);
index 3086a4b2f82f9b78b41ea7eda18736812131fddf..81dcc9b6af35b73472165c036b7cd681cfea0e6e 100644 (file)
@@ -1352,11 +1352,14 @@ static const size_t elf_buckets[] =
 
 boolean
 NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
-                                    export_dynamic, info, sinterpptr)
+                                    export_dynamic, filter_shlib,
+                                    auxiliary_filter_shlib, info, sinterpptr)
      bfd *output_bfd;
      const char *soname;
      const char *rpath;
      boolean export_dynamic;
+     const char *filter_shlib;
+     const char *auxiliary_filter_shlib;
      struct bfd_link_info *info;
      asection **sinterpptr;
 {
@@ -1426,6 +1429,28 @@ NAME(bfd_elf,size_dynamic_sections) (output_bfd, soname, rpath,
            return false;
        }
 
+      if (filter_shlib != NULL)
+       {
+         bfd_size_type indx;
+
+         indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
+                                    filter_shlib, true, true);
+         if (indx == (bfd_size_type) -1
+             || ! elf_add_dynamic_entry (info, DT_FILTER, indx))
+           return false;
+       }
+
+      if (auxiliary_filter_shlib != NULL)
+       {
+         bfd_size_type indx;
+
+         indx = _bfd_stringtab_add (elf_hash_table (info)->dynstr,
+                                    auxiliary_filter_shlib, true, true);
+         if (indx == (bfd_size_type) -1
+             || ! elf_add_dynamic_entry (info, DT_AUXILIARY, indx))
+           return false;
+       }
+
       /* Find all symbols which were defined in a dynamic object and make
         the backend pick a reasonable value for them.  */
       eif.failed = false;