bfd: strip symbols not representable in COFF/PE symbol table
authorJan Beulich <jbeulich@suse.com>
Wed, 10 Mar 2021 07:12:37 +0000 (08:12 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 10 Mar 2021 07:12:37 +0000 (08:12 +0100)
commit67b0f684803f5bec9b801c43fe1559bc88c15bb6
tree6430680e12759db6270ac8b4ffde38bab1756605
parent3044062c34f2372f4ecf81b69d9e63685cd5e995
bfd: strip symbols not representable in COFF/PE symbol table

The offset-within-section field in the symbol table entry is only 32
bits wide, so rather than emitting bogus entries omit them, and issue
a diagnostic identifying the issue.

This requires adjusting the PR/22267 test to no longer produce symbols
with out of range values on 64-bit BFD. This also depends on
adjustments to testsuite/ld-scripts/map-address.* made by an earlier
patch. The purpose of the test can very well be achieved nevertheless.
bfd/ChangeLog
bfd/cofflink.c
ld/ChangeLog
ld/scripttempl/mcorepe.sc
ld/testsuite/ld-scripts/pr22267.d
ld/testsuite/ld-scripts/pr22267.t