[PATCH 6/6] bfd: strip symbols not representable in COFF/PE symbol table

Jan Beulich jbeulich@suse.com
Mon Mar 8 15:05:10 GMT 2021


On 04.03.2021 10:06, Jan Beulich via Binutils wrote:
> ..., but I'll be waiting with committing this
> anyway until I've tested this against a more complete set of
> targets (like I'll also do for patch 5).

This change is producing a large amount of fallout on mcore. My
understanding is that this is due to ld/scripttempl/mcorepe.sc
having

  .stack 0x80000 :
  {
    _stack = .;
    *(.stack)
  }

This use of a fixed address makes it quite likely that _stack will
end up ahead of all sections (default image base being 0x400000),
and hence have a negative (i.e. apparently huge positive) value. I
have to admit I have a hard time seeing how placing the stack at a
fixed address can do anything good. Besides possibly wrapping the
assignment of _stack in a PROVIDE() (not tested yet) an option
might also be to replace the fixed address by ALIGN(0x80000).

According to the list of maintainers, there's no specific
maintainer for mcore, and the introduction of the above construct
is so old that I can't figure an original author. So it's rather
hard to find a suitable solution here without risking breakage.

Jan


More information about the Binutils mailing list