diff options
author | Ian Lance Taylor <ian@airs.com> | 1997-02-14 02:13:19 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1997-02-14 02:13:19 +0000 |
commit | 8696b2db7095e8387ef7ca145cd8541a6e9ee547 (patch) | |
tree | 92372b7be56ee759ec72473801c57c7482fbdf94 /bfd/evax-emh.c | |
parent | 236969ac80acb286a7fff50a58e3c89d5b755c84 (diff) | |
download | gdb-8696b2db7095e8387ef7ca145cd8541a6e9ee547.zip gdb-8696b2db7095e8387ef7ca145cd8541a6e9ee547.tar.gz gdb-8696b2db7095e8387ef7ca145cd8541a6e9ee547.tar.bz2 |
Thu Feb 13 20:53:22 1997 Klaus Kaempf (kkaempf@progis.de)
* reloc.c (BFD_RELOC_ALPHA_CODEADDR): New relocation for
openVMS/Alpha.
* evax.h (ALPHA_R_CODEADDR): New relocation.
* evax-alpha.c (ALPHA_R_CODEADDR): 64 bit procedure relocation for
openVMS/Alpha.
* evax-etir.c (ALPHA_R_CODEADDR): Output object code for this
relocation.
* bfd-in2.h, libbfd.h: Rebuild.
Restrict symbol length to 64 bytes, case preserving:
* evax-emh.c (_bfd_evax_write_emh): Remove case hacking.
* evax-misc.c (_bfd_evax_case_hack_symbol): Remove.
(_bfd_evax_length_hash_symbol): Added.
* evax-etir.c (_bfd_evax_write_etir): Call
_bfd_evax_length_hash_symbol before output of symbol.
* evax-egsd.c (_bfd_evax_write_egsd): Likewise.
* evax.h (flag_hash_long_names, flag_show_after_trunc): Remove.
* evax-emh.c: Output filename to object file without path.
* evax-egsd.c: New sections for local and global commons.
* evax-alpha.c, evax-emh.c, evax-egsd.c, evax-etir.c,
evax-misc.c, evax.h: Remove 8 bit characters from copyright
notices. Replace AXP with Alpha.
Diffstat (limited to 'bfd/evax-emh.c')
-rw-r--r-- | bfd/evax-emh.c | 49 |
1 files changed, 43 insertions, 6 deletions
diff --git a/bfd/evax-emh.c b/bfd/evax-emh.c index b59023b..288889c 100644 --- a/bfd/evax-emh.c +++ b/bfd/evax-emh.c @@ -1,11 +1,11 @@ -/* evax-emh.c -- BFD back-end for ALPHA EVAX (openVMS/AXP) files. - Copyright 1996 Free Software Foundation, Inc. +/* evax-emh.c -- BFD back-end for ALPHA EVAX (openVMS/Alpha) files. + Copyright 1996, 1997 Free Software Foundation, Inc. EMH record handling functions and EEOM record handling functions - Written by Klaus Kämpf (kkaempf@progis.de) + Written by Klaus K"ampf (kkaempf@progis.de) of proGIS Softwareentwicklung, Aachen, Germany This program is free software; you can redistribute it and/or modify @@ -23,6 +23,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdio.h> +#include <ctype.h> #include "bfd.h" #include "sysdep.h" @@ -196,7 +197,45 @@ _bfd_evax_write_emh (abfd) _bfd_evax_output_long (abfd, MAX_OUTREC_SIZE); if (bfd_get_filename (abfd) != 0) - _bfd_evax_output_counted (abfd, bfd_get_filename (abfd)); + { + /* strip path and suffix information */ + + char *fname, *fout, *fptr; + + fname = strdup (bfd_get_filename (abfd)); + if (fname == 0) + { + bfd_set_error (bfd_error_no_memory); + return -1; + } + fout = strrchr (fname, ']'); + if (fout == 0) + fout = strchr (fname, ':'); + if (fout != 0) + fout++; + else + fout = fname; + + /* strip .obj suffix */ + + fptr = strrchr (fname, '.'); + if ((fptr != 0) + && (strcasecmp (fptr, ".OBJ") == 0)) + *fptr = 0; + + fptr = fout; + while (*fptr != 0) + { + if (islower (*fptr)) + *fptr = toupper (*fptr); + fptr++; + if ((*fptr == ';') + || ((fptr - fout) > 31)) + *fptr = 0; + } + _bfd_evax_output_counted (abfd, fout); + free (fname); + } else _bfd_evax_output_counted (abfd, "NONAME"); @@ -227,8 +266,6 @@ _bfd_evax_write_emh (abfd) { PRIV(flag_hash_long_names) = symbol->name[6] - '0'; PRIV(flag_show_after_trunc) = symbol->name[7] - '0'; - PRIV(flag_no_hash_mixed_case) = symbol->name[8] - '0'; - PRIV(vms_name_mapping) = symbol->name[9] - '0'; if (had_file) break; |