* elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
authorAlan Modra <amodra@gmail.com>
Fri, 19 Sep 2003 02:08:35 +0000 (02:08 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 19 Sep 2003 02:08:35 +0000 (02:08 +0000)
since some ABIs round up the size of the struct.

bfd/ChangeLog
bfd/elf.c

index 49cfb2b411ef8862c36f5450bc43023fdddaac10..4ffd41f53c637c64ce31b9106ee758a2891da35b 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-19  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
+       since some ABIs round up the size of the struct.
+
 2003-09-18  H.J. Lu  <hongjiu.lu@intel.com>
 
        * elflink.c (_bfd_elf_merge_symbol): Allow type change if
        (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
        (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
        linked with v850e binaries.  Mark the output as v850e.
-       
+
 2003-09-03  Nick Clifton  <nickc@redhat.com>
 
-       * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section 
+       * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
        symbols that are used in relocs.
 
 2003-08-30  Robert Millan  <robertmh@gnu.org>
 
 2003-08-24  Jason Eckhardt  <jle@rice.edu>
 
-       * coff-i860.c (CALC_ADDEND): Define to be a no-op. 
+       * coff-i860.c (CALC_ADDEND): Define to be a no-op.
 
 2003-08-24  Jason Eckhardt  <jle@rice.edu>
 
 
 2003-08-23  Jason Eckhardt  <jle@rice.edu>
 
-        * coff-i860.c (coff_i860_reloc_nyi): New function.
+       * coff-i860.c (coff_i860_reloc_nyi): New function.
        (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
        LOWn, SPLITn, and BRADDR.
        (RTYPE2HOWTO): Check that the r_type is within the howto_table
index 3868cff6a1d6d09970d34c4f781814a8ffa5e423..5935803f11c279e4580c867e9a03aedbe5381b4a 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2430,7 +2430,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *failedptrarg)
     case SHT_HASH:
       this_hdr->sh_entsize = bed->s->sizeof_hash_entry;
       break;
-  
+
     case SHT_DYNSYM:
       this_hdr->sh_entsize = bed->s->sizeof_sym;
       break;
@@ -7066,7 +7066,7 @@ elfcore_write_note (bfd  *abfd,
       pad = -namesz & ((1 << bed->s->log_file_align) - 1);
     }
 
-  newspace = sizeof (Elf_External_Note) - 1 + namesz + pad + size;
+  newspace = 12 + namesz + pad + size;
 
   p = realloc (buf, *bufsiz + newspace);
   dest = p + *bufsiz;
This page took 0.03234 seconds and 4 git commands to generate.