diff options
author | Alan Modra <amodra@gmail.com> | 2007-09-26 03:07:45 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-09-26 03:07:45 +0000 |
commit | 2e5b2d74049eb4cf0df72a64d203cd270abd64aa (patch) | |
tree | 30b9d261fc0e7d1e6c61e16dd1d06fccafee1d81 /bfd | |
parent | 939bfe3b97991280b41774b1e94055c442a07309 (diff) | |
download | gdb-2e5b2d74049eb4cf0df72a64d203cd270abd64aa.zip gdb-2e5b2d74049eb4cf0df72a64d203cd270abd64aa.tar.gz gdb-2e5b2d74049eb4cf0df72a64d203cd270abd64aa.tar.bz2 |
* elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 61ebc18..690c46d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2007-09-26 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (ppc_build_one_stub): Correct rel_hdr.sh_size. + 2007-09-25 Alan Modra <amodra@bigpond.net.au> * elf32-spu.c (struct spu_link_hash_table): Add ovly_load_r_symndx. diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index b5e4556..71c77b5 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8317,8 +8317,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (relocs == NULL) return FALSE; elfsec_data->relocs = relocs; - elfsec_data->rel_hdr.sh_size = relsize; - elfsec_data->rel_hdr.sh_entsize = 24; + elfsec_data->rel_hdr.sh_size = (stub_entry->stub_sec->reloc_count + * sizeof (Elf64_External_Rela)); + elfsec_data->rel_hdr.sh_entsize = sizeof (Elf64_External_Rela); stub_entry->stub_sec->reloc_count = 0; } r = relocs + stub_entry->stub_sec->reloc_count; @@ -8415,8 +8416,9 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (relocs == NULL) return FALSE; elfsec_data->relocs = relocs; - elfsec_data->rel_hdr.sh_size = relsize; - elfsec_data->rel_hdr.sh_entsize = 24; + elfsec_data->rel_hdr.sh_size = (stub_entry->stub_sec->reloc_count + * sizeof (Elf64_External_Rela)); + elfsec_data->rel_hdr.sh_entsize = sizeof (Elf64_External_Rela); htab->brlt->reloc_count = 0; } r = relocs + htab->brlt->reloc_count; |