aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-08-25 16:57:32 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-08-25 16:57:32 +0000
commit8dd881b6e33b95dbebe06d6929d7e7d30a151bd6 (patch)
treeb3118899b782a14323f9f61447e214006ef5aa6f /ld/emultempl
parent3c11dd799b725cbbb72ba5c19b6aebb0a7892508 (diff)
downloadgdb-8dd881b6e33b95dbebe06d6929d7e7d30a151bd6.zip
gdb-8dd881b6e33b95dbebe06d6929d7e7d30a151bd6.tar.gz
gdb-8dd881b6e33b95dbebe06d6929d7e7d30a151bd6.tar.bz2
Check audit entry only on ELF input.
2010-08-25 H.J. Lu <hongjiu.lu@intel.com> PR ld/11946 * emultempl/elf32.em (_before_allocation): Check audit entry only on ELF input.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em49
1 files changed, 25 insertions, 24 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index aa9d787..c8682ae 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1495,33 +1495,34 @@ gld${EMULATION_NAME}_before_allocation (void)
rpath = (const char *) getenv ("LD_RUN_PATH");
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
- {
- const char *audit_libs = elf_dt_audit (abfd);
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ {
+ const char *audit_libs = elf_dt_audit (abfd);
- /* If the input bfd contains an audit entry, we need to add it as
- a dep audit entry. */
- if (audit_libs && *audit_libs != '\0')
- {
- char *cp = xstrdup (audit_libs);
- do
- {
- int more = 0;
- char *cp2 = strchr (cp, config.rpath_separator);
+ /* If the input bfd contains an audit entry, we need to add it as
+ a dep audit entry. */
+ if (audit_libs && *audit_libs != '\0')
+ {
+ char *cp = xstrdup (audit_libs);
+ do
+ {
+ int more = 0;
+ char *cp2 = strchr (cp, config.rpath_separator);
- if (cp2)
- {
- *cp2 = '\0';
- more = 1;
- }
-
- if (cp != NULL && *cp != '\0')
- gld${EMULATION_NAME}_append_to_separated_string (&depaudit, cp);
+ if (cp2)
+ {
+ *cp2 = '\0';
+ more = 1;
+ }
- cp = more ? ++cp2 : NULL;
- }
- while (cp != NULL);
- }
- }
+ if (cp != NULL && *cp != '\0')
+ gld${EMULATION_NAME}_append_to_separated_string (&depaudit, cp);
+
+ cp = more ? ++cp2 : NULL;
+ }
+ while (cp != NULL);
+ }
+ }
if (! (bfd_elf_size_dynamic_sections
(link_info.output_bfd, command_line.soname, rpath,