I recently had a customer complaint about building an ELF executable that
exports entry points. They used --dynamic-list=$file to specify the names
for export. To make that work they also had to specify -u for each name
and make a reference to each name in their code.
It seems wrong that they have to make a call to a symbol in order to have
it exported.
It seems wrong that names specified by --dynamic-list= don't create an
undefined reference (as per -u).
My solution is attached. There is no functional change for building shared
objects. Only for using --dynamic-list when building executables.
Tested & bootstrapped on x86_64-unknown-linux-gnu
Also tested on a MIPS target.
Comments?