[RFC:] Put export_dynamics flag in struct bfd_link_info?
Hans-Peter Nilsson
hans-peter.nilsson@axis.com
Thu Jun 7 09:41:00 GMT 2001
I have a problem with the CRIS port when linking with
--export-dynamic, because the CRIS port aggressively neutralizes
dynamic symbols when it finds out that no other object actually
references them (nobody needs dynamic relocations to them).
This of course fails with --export-dynamic (doh!). My preferred
solution includes letting the port look at the export-dynamics
flag. At present, the export-dynamics flag is stored as a
command-line variable in the linker, and passed on in elf32.em
as a parameter to bfd_elf32_size_dynamic_sections. When the
port-specific elf_backend_size_dynamic_sections is called, that
parameter is not passed on, and the flag is nowhere in sight.
I could do something port-specific to pass on the
command_line.export_dynamics from the linker, but it seems to me
it would be better to handle it like the "symbolic flag", and
put it in struct bfd_link_info (include/bfdlink.h). All users
of command_line.export_dynamic (just
gld${EMULATION_NAME}_before_allocation and
bfd_elfNN_size_dynamic_sections, I think) could in due time be
changed to just look at the link_info flag; no need to pass it
on as a parameter.
Would putting export_dynamics flag in struct bfd_link_info be
acceptable? If not, I'll make up a port-specific solution.
brgds, H-P
More information about the Binutils
mailing list