aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-09-19 02:08:35 +0000
committerAlan Modra <amodra@gmail.com>2003-09-19 02:08:35 +0000
commit5de3bf90966b027e4a1c63f6331079efc9451a48 (patch)
treed9f85b2ac5098e9aae3107a8273045d9aebb714f /bfd/elf.c
parentfdeb2c9fb737b6428f71d22371b925a86209153f (diff)
downloadgdb-5de3bf90966b027e4a1c63f6331079efc9451a48.zip
gdb-5de3bf90966b027e4a1c63f6331079efc9451a48.tar.gz
gdb-5de3bf90966b027e4a1c63f6331079efc9451a48.tar.bz2
* elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
since some ABIs round up the size of the struct.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 3868cff..5935803 100644
--- 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;