From c0846b239705bd8528996e60dbabe16344410b2d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 17 Aug 2001 15:56:58 +0000 Subject: [PATCH] * bfd.c (bfd_get_gp_size): Return an unsigned int. (bfd_set_gp_size): Make param unsigned. * bfd-in2.h: Regenerate. * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather than calling bfd_get_gp_size. * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise. --- bfd/ChangeLog | 10 ++++++++++ bfd/bfd-in2.h | 4 ++-- bfd/bfd.c | 8 ++++---- bfd/elf32-ppc.c | 2 +- bfd/elf64-alpha.c | 2 +- bfd/elfxx-ia64.c | 2 +- 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 93af0218030..f80b01b06d1 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2001-08-17 Alan Modra + + * bfd.c (bfd_get_gp_size): Return an unsigned int. + (bfd_set_gp_size): Make param unsigned. + * bfd-in2.h: Regenerate. + * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather + than calling bfd_get_gp_size. + * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise. + * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise. + 2001-08-17 Alan Modra * linker.c (default_fill_link_order): Handle four byte fill value. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 37dae3da465..67881f2c150 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3202,11 +3202,11 @@ bfd_get_mtime PARAMS ((bfd *abfd)); long bfd_get_size PARAMS ((bfd *abfd)); -int +unsigned int bfd_get_gp_size PARAMS ((bfd *abfd)); void -bfd_set_gp_size PARAMS ((bfd *abfd, int i)); +bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i)); bfd_vma bfd_scan_vma PARAMS ((const char *string, const char **end, int base)); diff --git a/bfd/bfd.c b/bfd/bfd.c index 8305ddc23a2..2f5e260934d 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -891,7 +891,7 @@ FUNCTION bfd_get_gp_size SYNOPSIS - int bfd_get_gp_size(bfd *abfd); + unsigned int bfd_get_gp_size(bfd *abfd); DESCRIPTION Return the maximum size of objects to be optimized using the GP @@ -899,7 +899,7 @@ DESCRIPTION argument to the compiler, assembler or linker. */ -int +unsigned int bfd_get_gp_size (abfd) bfd *abfd; { @@ -918,7 +918,7 @@ FUNCTION bfd_set_gp_size SYNOPSIS - void bfd_set_gp_size(bfd *abfd, int i); + void bfd_set_gp_size(bfd *abfd, unsigned int i); DESCRIPTION Set the maximum size of objects to be optimized using the GP @@ -929,7 +929,7 @@ DESCRIPTION void bfd_set_gp_size (abfd, i) bfd *abfd; - int i; + unsigned int i; { /* Don't try to set GP size on an archive or core file! */ if (abfd->format != bfd_object) diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 87a07b57e7c..413a7697cb9 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -2578,7 +2578,7 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) { if (sym->st_shndx == SHN_COMMON && !info->relocateable - && sym->st_size <= (bfd_vma) bfd_get_gp_size (abfd)) + && sym->st_size <= elf_gp_size (abfd)) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sdata. */ diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index f7d8db55984..73a085ff7cd 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -1855,7 +1855,7 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) { if (sym->st_shndx == SHN_COMMON && !info->relocateable - && sym->st_size <= (unsigned int) bfd_get_gp_size (abfd)) + && sym->st_size <= elf_gp_size (abfd)) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sbss. */ diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 8aebd81ba62..8fdb9a07c91 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -1130,7 +1130,7 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) { if (sym->st_shndx == SHN_COMMON && !info->relocateable - && sym->st_size <= (unsigned) bfd_get_gp_size (abfd)) + && sym->st_size <= elf_gp_size (abfd)) { /* Common symbols less than or equal to -G nn bytes are automatically put into .sbss. */ -- 2.30.2