From 0293d5b019a65b8fb642554d0a8716bbba5d64c7 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Fri, 24 May 1996 18:30:52 +0000 Subject: [PATCH] Do not put small common symbols into .sbss if ld -r --- bfd/ChangeLog | 5 +++++ bfd/elf32-ppc.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 5defe84bb83..298a524bfdd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +Fri May 24 14:28:38 1996 Michael Meissner + + * elf32-ppc.c (ppc_elf_add_symbol_hook): Do not put small common + symbols into .sbss if this is a relocatable link. + Thu May 23 12:26:24 1996 Ian Lance Taylor * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Warn about diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 4b31b09a889..abe5a0536d8 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -1974,12 +1974,14 @@ ppc_elf_check_relocs (abfd, info, sec, relocs) if (h != NULL && strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) break; + /* fall through */ case R_PPC_REL14: case R_PPC_REL14_BRTAKEN: case R_PPC_REL14_BRNTAKEN: if (h == NULL) break; + /* fall through */ default: if (info->shared @@ -2047,7 +2049,7 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) asection **secp; bfd_vma *valp; { - if (sym->st_shndx == SHN_COMMON && sym->st_size <= bfd_get_gp_size (abfd)) + if (sym->st_shndx == SHN_COMMON && !info->relocateable && sym->st_size <= bfd_get_gp_size (abfd)) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sdata. */ -- 2.30.2