diff options
author | Nick Clifton <nickc@redhat.com> | 2005-07-14 07:07:46 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2005-07-14 07:07:46 +0000 |
commit | 15ac1d4f68f6ee5be2df0e125b101759f27dfd12 (patch) | |
tree | 3aa9b3136a8d379dad86fef7c5be3e20e18171fd /bfd/coff-alpha.c | |
parent | 1d9c9cd779b490a3934235b2a6bf18b9282e3642 (diff) | |
download | gdb-15ac1d4f68f6ee5be2df0e125b101759f27dfd12.zip gdb-15ac1d4f68f6ee5be2df0e125b101759f27dfd12.tar.gz gdb-15ac1d4f68f6ee5be2df0e125b101759f27dfd12.tar.bz2 |
Add code to detect and either handle or issue an error message for binaries
created by the DEC ALPHA compilers.
Diffstat (limited to 'bfd/coff-alpha.c')
-rw-r--r-- | bfd/coff-alpha.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index 444385e..19aeb96 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -481,10 +481,16 @@ alpha_ecoff_bad_format_hook (abfd, filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; - if (ALPHA_ECOFF_BADMAG (*internal_f)) - return FALSE; + if (! ALPHA_ECOFF_BADMAG (*internal_f)) + return TRUE; - return TRUE; + if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f)) + (*_bfd_error_handler) + (_("%B: Cannot handle compressed Alpha binaries.\n" + " Use compiler flags, or objZ, to generate uncompressed binaries."), + abfd); + + return FALSE; } /* This is a hook called by coff_real_object_p to create any backend @@ -603,8 +609,11 @@ alpha_ecoff_swap_reloc_out (abfd, intern, dst) size = intern->r_size; } + /* XXX FIXME: The maximum symndx value used to be 14 but this + fails with object files prodiced by DEC's C++ compiler. + Where does the value 14 (or 15) come from anyway ? */ BFD_ASSERT (intern->r_extern - || (intern->r_symndx >= 0 && intern->r_symndx <= 14)); + || (intern->r_symndx >= 0 && intern->r_symndx <= 15)); H_PUT_64 (abfd, intern->r_vaddr, ext->r_vaddr); H_PUT_32 (abfd, symndx, ext->r_symndx); |