diff options
author | James Cowgill <james.cowgill@mips.com> | 2018-04-05 08:47:53 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2018-04-05 08:47:53 -0700 |
commit | 67faf1f4c206516837fa44f6b7d131966be6bf0f (patch) | |
tree | 12c5664c413c975cada0ca64fb7bb37f2bff1454 /zlib | |
parent | 043e9508be0a4ea7ab56fd5716e4c06d609d13be (diff) | |
download | gdb-67faf1f4c206516837fa44f6b7d131966be6bf0f.zip gdb-67faf1f4c206516837fa44f6b7d131966be6bf0f.tar.gz gdb-67faf1f4c206516837fa44f6b7d131966be6bf0f.tar.bz2 |
MIPS: Fix GOT page counter in multi-got links
The record_got_page_entry function records and updates the maximum
number of GOT page entries which may be required by an object. In the
case where an existing GOT page entry was expanded, only the entry
belonging to output GOT would have its page count updated. This leaves
the entry belonging to the object GOT with the num_pages count of 1 it
was originally initialized with. Later on when GOTs are being merged in a
multi-got link, this causes the value of entry->num_pages in
add_got_page_entries to always be 1 and underestimates the number of pages
required for the new entry. This in turn leads to an assertion failure in
get_got_page_offset where we run out of pages.
Fix by obtaining the object's GOT entry unconditionally and not just
the first time it gets created. Now that entry2 is always valid, remove
the useless NULL checks.
gold/
PR gold/22770
* mips.cc (Mips_got_info::record_got_page_entry): Fetch existing
page entries for the object's GOT.
Diffstat (limited to 'zlib')
0 files changed, 0 insertions, 0 deletions