diff options
| author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2010-07-10 02:29:22 +0000 |
|---|---|---|
| committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2010-07-10 02:29:22 +0000 |
| commit | 2cf64c8006d7b7c6b122b7a492086a8cefe0f4d4 (patch) | |
| tree | 9f6c3a9c7f6dc298b58f5ddb2655b080c986678d /contrib/binutils | |
| parent | b543e91ba5678e60f8a6b612d473365c8fa83648 (diff) | |
Notes
Diffstat (limited to 'contrib/binutils')
| -rw-r--r-- | contrib/binutils/bfd/elf64-ppc.c | 14 | ||||
| -rw-r--r-- | contrib/binutils/ld/lexsup.c | 3 |
2 files changed, 14 insertions, 3 deletions
diff --git a/contrib/binutils/bfd/elf64-ppc.c b/contrib/binutils/bfd/elf64-ppc.c index a0d81d0550ee..bc9e0a765dc3 100644 --- a/contrib/binutils/bfd/elf64-ppc.c +++ b/contrib/binutils/bfd/elf64-ppc.c @@ -3268,13 +3268,13 @@ create_got_section (bfd *abfd, struct bfd_link_info *info) flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); - got = bfd_make_section (abfd, ".got"); + got = bfd_make_section_anyway (abfd, ".got"); if (!got || !bfd_set_section_flags (abfd, got, flags) || !bfd_set_section_alignment (abfd, got, 3)) return FALSE; - relgot = bfd_make_section (abfd, ".rela.got"); + relgot = bfd_make_section_anyway (abfd, ".rela.got"); if (!relgot || ! bfd_set_section_flags (abfd, relgot, flags | SEC_READONLY) || ! bfd_set_section_alignment (abfd, relgot, 3)) @@ -6033,6 +6033,10 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next) { + /* Skip this BFD if it is not ELF */ + if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) + continue; + s = ppc64_elf_tdata (ibfd)->got; if (s != NULL && s != htab->got) { @@ -7206,7 +7210,7 @@ ppc64_elf_build_stubs (bfd_boolean emit_stub_syms, stub_sec->_cooked_size = 0; } - if (htab->plt != NULL) + if (htab->glink != NULL && htab->glink->contents != NULL) { unsigned int indx; bfd_vma plt0; @@ -9000,6 +9004,10 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, while ((dynobj = dynobj->link_next) != NULL) { asection *s; + + if (bfd_get_flavour (dynobj) != bfd_target_elf_flavour) + continue; + s = ppc64_elf_tdata (dynobj)->got; if (s != NULL && s->_raw_size != 0 diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c index b377bd4c7c27..ea3a558362b4 100644 --- a/contrib/binutils/ld/lexsup.c +++ b/contrib/binutils/ld/lexsup.c @@ -1145,8 +1145,11 @@ parse_args (unsigned argc, char **argv) whole_archive = TRUE; break; case OPTION_AS_NEEDED: +/* XXX: --as-needed is broken on powerpc64 */ +#ifndef __powerpc64__ as_needed = TRUE; break; +#endif case OPTION_NO_AS_NEEDED: as_needed = FALSE; break; |
