diff options
author | Ed Maste <emaste@FreeBSD.org> | 2013-10-02 00:50:27 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2013-10-02 00:50:27 +0000 |
commit | 36afc9ab6c1c7fdb2e40bdcfde169501d962dd84 (patch) | |
tree | f54353cd04b637f34446f5384c1a8dacd98f592b /contrib/binutils/bfd | |
parent | 5bab73677e42ba68b0982b79870435b2bcfe4d52 (diff) | |
download | src-36afc9ab6c1c7fdb2e40bdcfde169501d962dd84.tar.gz src-36afc9ab6c1c7fdb2e40bdcfde169501d962dd84.zip |
Use correct size for MIPS .rld_map section
On MIPS .dynamic is read-only and so a special section .rld_map is used
to store the pointer to the rtld information for debuggers. This
section had a hard coded size of 4 bytes which is not correct for
mips64. (Note that FreeBSD's rtld does not yet populate .rld_map.)
Sponsored by: DARPA, AFRL
Approved by: re (delphij)
Notes
Notes:
svn path=/head/; revision=255982
Diffstat (limited to 'contrib/binutils/bfd')
-rw-r--r-- | contrib/binutils/bfd/elfxx-mips.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/binutils/bfd/elfxx-mips.c b/contrib/binutils/bfd/elfxx-mips.c index eac685ff0ab5..8f4b05d0687d 100644 --- a/contrib/binutils/bfd/elfxx-mips.c +++ b/contrib/binutils/bfd/elfxx-mips.c @@ -557,6 +557,10 @@ static bfd *reldyn_sorting_bfd; #define MIPS_ELF_DYN_SIZE(abfd) \ (get_elf_backend_data (abfd)->s->sizeof_dyn) +/* The size of the rld_map pointer. */ +#define MIPS_ELF_RLD_MAP_SIZE(abfd) \ + (get_elf_backend_data (abfd)->s->arch_size / 8) + /* The size of a GOT entry. */ #define MIPS_ELF_GOT_SIZE(abfd) \ (get_elf_backend_data (abfd)->s->arch_size / 8) @@ -7492,7 +7496,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, { /* We add a room for __rld_map. It will be filled in by the rtld to contain a pointer to the _r_debug structure. */ - s->size += 4; + s->size += MIPS_ELF_RLD_MAP_SIZE (output_bfd); } else if (SGI_COMPAT (output_bfd) && CONST_STRNEQ (name, ".compact_rel")) |