diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-08-08 16:27:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-08-08 16:27:21 +0000 |
commit | 8612a388f71b8a34a4f118a1f9e5ca660342d7cf (patch) | |
tree | 8e5c2366446f0297c15524df542e107509c7f635 /bfd/evax-egsd.c | |
parent | 9e8419d04303bfddb2b062f70ef70541a7f14a10 (diff) | |
download | gdb-8612a388f71b8a34a4f118a1f9e5ca660342d7cf.zip gdb-8612a388f71b8a34a4f118a1f9e5ca660342d7cf.tar.gz gdb-8612a388f71b8a34a4f118a1f9e5ca660342d7cf.tar.bz2 |
Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>
* evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup.
(evax_initialize): Remove evax_reloc_table.
(evax_close_and_cleanup): Ditto.
(reloc_nil): Ditto.
(alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64
entries.
(evax_bfd_reloc_type_lookup): Ditto.
* evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set
cooked_size == raw_size.
* evax-emh.c (_bfd_evax_register_filename): Remove.
* evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands.
* evax-misc.c (add_new_contents): Malloc section at full size.
(_bfd_save_evax_section): Memcpy section contents directly.
* evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove.
(evax_reloc_table): Remove.
* hosts/alphavms.h (O_ACCMODE): Define if needed.
* makefile.vms: Add better support for DEC C compilation
Add evax.h dependencies
* reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc.
(BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove.
(BFD_RELOC_ALPHA_BASEREG): Remove.
* bfd-in2.h, libbfd.h: Rebuild.
Diffstat (limited to 'bfd/evax-egsd.c')
-rw-r--r-- | bfd/evax-egsd.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/bfd/evax-egsd.c b/bfd/evax-egsd.c index b1394f1..f5275a9 100644 --- a/bfd/evax-egsd.c +++ b/bfd/evax-egsd.c @@ -261,7 +261,7 @@ _bfd_evax_slurp_egsd (abfd) return -1; old_flags = bfd_getl16 (evax_rec + 6); section->_raw_size = bfd_getl32 (evax_rec + 8); /* allocation */ - new_flags = evax_secflag_by_name (name, section->_raw_size); + new_flags = evax_secflag_by_name (name, (int) section->_raw_size); if (old_flags & EGPS_S_V_REL) new_flags |= SEC_RELOC; if (!bfd_set_section_flags (abfd, section, new_flags)) @@ -271,14 +271,13 @@ _bfd_evax_slurp_egsd (abfd) if ((base_addr % align_addr) != 0) base_addr += (align_addr - (base_addr % align_addr)); section->vma = (bfd_vma)base_addr; - base_addr += section->_raw_size; /* FIXME: should be cooked size */ - section->contents = (unsigned char *) malloc (section->_raw_size); + base_addr += section->_raw_size; + section->contents = ((unsigned char *) + bfd_malloc (section->_raw_size)); if (section->contents == NULL) - { - bfd_set_error (bfd_error_no_memory); - return -1; - } - memset (section->contents, 0, section->_raw_size); + return -1; + memset (section->contents, 0, (size_t) section->_raw_size); + section->_cooked_size = section->_raw_size; #if EVAX_DEBUG evax_debug(3, "egsd psc %d (%s, flags %04x=%s) ", section->index, name, old_flags, flag2str(gpsflagdesc, old_flags)); |