diff options
author | Jeff Law <law@redhat.com> | 1994-03-26 18:28:29 +0000 |
---|---|---|
committer | Jeff Law <law@redhat.com> | 1994-03-26 18:28:29 +0000 |
commit | 250578363e45567f5168e913f58959dd10575ba8 (patch) | |
tree | ca1f77735e1ecb4169a578509949bffbe1499ebf /bfd/elf32-hppa.c | |
parent | 649694ea87ae0cbd4355ac0d68f27e6052fc10e4 (diff) | |
download | gdb-250578363e45567f5168e913f58959dd10575ba8.zip gdb-250578363e45567f5168e913f58959dd10575ba8.tar.gz gdb-250578363e45567f5168e913f58959dd10575ba8.tar.bz2 |
* libbfd.c (bfd_read): Set bfd_error as appropriate for a short
read. (bfd_error_system_call or bfd_error_file_truncated).
* som.c: Do not blindly set bfd_error_system_call after a
failing bfd_read, bfd_write, or bfd_seek. In a few places
(like som_object_p) override the error status set by bfd_read.
* aix386-core.c, aout-encap,c archive.c, bout.c: Likewise.
* coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise.
* elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise.
* nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise.
* som.c: Check return values from several bfd_{seek,read,write}
calls that we just assumed were not failing.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r-- | bfd/elf32-hppa.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 4325e26..0da3f23 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -269,6 +269,8 @@ static boolean elf32_hppa_backend_fake_sections static boolean elf32_hppa_backend_section_from_bfd_section PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *, int *)); +static boolean som_bfd_is_local_label PARAMS ((bfd *, asymbol *)); + /* ELF/PA relocation howto entries. */ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] = @@ -1581,6 +1583,15 @@ elf_hppa_reloc_type_lookup (arch, code) return NULL; } +/* Return true if SYM represents a local label symbol. */ + +static boolean +hppa_elf_is_local_label (abfd, sym) + bfd *abfd; + asymbol *sym; +{ + return (sym->name[0] == 'L' && sym->name[1] == '$'); +} /* Update the symbol extention chain to include the symbol pointed to by SYMBOLP if SYMBOLP is a function symbol. Used internally and by GAS. */ @@ -1934,7 +1945,7 @@ hppa_elf_stub_finish (output_bfd) /* Make space to hold the relocations for the stub section. */ reloc_size = bfd_get_reloc_upper_bound (stub_bfd, stub_sec); reloc_vector = (arelent **) malloc (reloc_size); - if (reloc_vector == NULL) + if (reloc_vector == NULL && reloc_size != 0) { /* FIXME: should be returning an error so the caller can clean up */ @@ -3133,16 +3144,10 @@ elf32_hppa_backend_symbol_table_processing (abfd, esyms,symcnt) /* Read in the symextn section. */ if (bfd_seek (abfd, symextn_hdr->sh_offset, SEEK_SET) == -1) - { - bfd_set_error (bfd_error_system_call); - return (false); - } + return false; if (bfd_read ((PTR) symextn_hdr->contents, 1, symextn_hdr->size, abfd) != symextn_hdr->size) - { - bfd_set_error (bfd_error_system_call); - return (false); - } + return false; /* Parse entries in the symbol extension section, updating the symtab entries as we go */ @@ -3373,6 +3378,7 @@ elf32_hppa_backend_section_from_bfd_section (abfd, hdr, asect, ignored) #define bfd_generic_get_section_contents hppa_elf_get_section_contents #define bfd_elf32_set_section_contents hppa_elf_set_section_contents +#define bfd_elf32_bfd_is_local_label hppa_elf_is_local_label #define elf_backend_section_processing elf32_hppa_backend_section_processing |