Symver attribute

Joseph Myers joseph@codesourcery.com
Tue Nov 19 01:45:00 GMT 2019


On Mon, 18 Nov 2019, Rainer Orth wrote:

> So you certainly need such an effective-target test and, at least as
> importantly, a configure test at build time that you can assemble, link,
> and run a test correctly before enabling it in gcc.  Just
> unconditionally dropping it into elfos.h is wrong.

Tests in gcc/configure for linking or running something are a bad idea 
because they don't work for cross compilation (at all, for run tests; when 
bootstrapping and target libc hasn't been built, for link tests).

I'd assume any bare-metal ELF target used with GNU binutils *could* 
support symbol versioning if it happens to be used with an RTOS that has a 
dynamic linker with that support, even if in fact it's much more likely to 
be used with static linking only.  So I don't think the information is 
available when GCC is built, beyond (a) it's definitely not supported for 
non-ELF targets (as determined through by a list of targets such as in 
config/elf.m4:ACX_ELF_TARGET_IFELSE) and (b) there might be a list of ELF 
OS targets known to lack support.

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list