From: visa Date: Tue, 29 Nov 2022 15:38:00 +0000 (+0000) Subject: Use correct size for mips64 .rld_map section. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3683a0e23bb571f9a9a10ab086dc0d150b035c20;p=openbsd Use correct size for mips64 .rld_map section. From FreeBSD commit 36afc9ab6c1c7fdb2e40bdcfde169501d962dd84 OK kettenis@ --- diff --git a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c b/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c index 39945ba674b..c5059153e04 100644 --- a/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c +++ b/gnu/usr.bin/binutils-2.17/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) @@ -7432,7 +7436,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) && strncmp (name, ".compact_rel", 12) == 0)