ld/sort.exp tests and FDPIC bfds
Mon Apr 28 14:05:00 GMT 2008
> when running the sort.exp tests, the run_dump_test fails because the linker
> scripts are not able to discard this symbol which leaves with an extra line:
> extra lines in tmpdir/dump.out starting with "^00020000 A __stacksize$"
> what's the right answer here ? should i update run_dump_test in
> ld/testsuite/ld-libs/libs.exp to discard any __stacksize symbols marked as
> absolute ?
Not a good idea. There may be (future) tests that look for such a
symbol. If you made the discarding conditional upon *-fdpic targets
that might be better, but really I would prefer not to have too many
target specific features in the support library.
Ideally the correct way to fix this problem is to have the __stacksize
symbol be PROVIDEd by the default linker script(s). That way when the
sort.exp tests use their own linker script they will not encounter this
problem. Ie you would have to remove the definition from the bfd files
and move it into the linker scripts.
Alternatively you could use the --retain-symbols-file command line
switch to strip out the __stacksize symbol, although this would be
rather clunky, error prone, and pretty much contrary to the nature of
The other alternative of course is to xfail the affected tests.
More information about the Binutils