From ff15b24025763b5e8c609fc1ec15af3091a52133 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 24 Jul 2006 18:18:19 +0000 Subject: [PATCH] * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME): Set for *-*-solaris2*. * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific sections only if the SHF_OS_NONCONFORMING flag is present. --- bfd/ChangeLog | 5 +++++ bfd/elf.c | 19 ++++++++++++++----- ld/ChangeLog | 5 +++++ ld/emulparams/elf_x86_64.sh | 6 +++++- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 98a3bc458a..8292b28ee1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-07-24 Michael Wetherell + + * elf.c (bfd_section_from_shdr): Reject unrecognised OS-specific + sections only if the SHF_OS_NONCONFORMING flag is present. + 2006-07-24 Nick Clifton PR ld/2729 diff --git a/bfd/elf.c b/bfd/elf.c index 85f9e0f132..b90061301c 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -2201,11 +2201,20 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) "`%s' [0x%8x]"), abfd, name, hdr->sh_type); else if (hdr->sh_type >= SHT_LOOS && hdr->sh_type <= SHT_HIOS) - /* FIXME: We should handle this section. */ - (*_bfd_error_handler) - (_("%B: don't know how to handle OS specific section " - "`%s' [0x%8x]"), - abfd, name, hdr->sh_type); + { + /* Unrecognised OS-specific sections. */ + if ((hdr->sh_flags & SHF_OS_NONCONFORMING) != 0) + /* SHF_OS_NONCONFORMING indicates that special knowledge is + required to correctly process the section and the file should + be rejected with an error message. */ + (*_bfd_error_handler) + (_("%B: don't know how to handle OS specific section " + "`%s' [0x%8x]"), + abfd, name, hdr->sh_type); + else + /* Otherwise it should be processed. */ + return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex); + } else /* FIXME: We should handle this section. */ (*_bfd_error_handler) diff --git a/ld/ChangeLog b/ld/ChangeLog index c78c52974d..f227698162 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2006-07-14 Michael Wetherell + + * emulparams/elf_x86_64.sh (LIBPATH_SUFFIX, ELF_INTERPRETER_NAME): + Set for *-*-solaris2*. + 2006-07-24 Ralk Wildenhues * ld.texinfo: Fix spelling mistakes. diff --git a/ld/emulparams/elf_x86_64.sh b/ld/emulparams/elf_x86_64.sh index f9ed236ad4..3ed02039b3 100644 --- a/ld/emulparams/elf_x86_64.sh +++ b/ld/emulparams/elf_x86_64.sh @@ -22,7 +22,7 @@ if [ "x${host}" = "x${target}" ]; then esac fi -# Linux modify the default library search path to first include +# Linux/Solaris modify the default library search path to first include # a 64-bit specific directory. case "$target" in x86_64*-linux*) @@ -30,4 +30,8 @@ case "$target" in *64*) LIBPATH_SUFFIX=64 ;; esac ;; + *-*-solaris2*) + LIBPATH_SUFFIX=/amd64 + ELF_INTERPRETER_NAME=\"/lib/amd64/ld.so.1\" + ;; esac