"Paulo J. Matos" <pocma...@gmail.com> writes: > I am quite confused with libgcc-<arch>.ver details. I can't find any > documentation on this file except by looking at the files that already > exist. > > So, let me see if I got this write. The file > config/<arch>/libgcc-<arch>.ver tells gcc to build libgcc so that it > export the symbols listed there (under a specific group which seems > to be a gcc version).
Basically, yes. The symbol grouping is a version string which the linker will attach to the symbols in that group when creating libgcc.so. When a program is later linked against libgcc.so, the linker will record the versions of the symbols in the resulting executable. The dynamic linker will then verify at runtime that the symbol versions are available. > - Will gcc automatically pick the file when building for a specific > arch or do I need to do something else? You need to have gcc/config.gcc include t-slibgcc-elf-ver in tmake_file. You also need to set SHLIB_MAPFILES in some config/ARCH/t-XXX file that config.gcc includes in tmake_file. See existing examples. > - For floating point emulation, how does gcc know that the arch needs > floating point emulation or not? Does it depend on the insns that are > defined in the md file? Yes. If insns exist with the right name, they will be used. Otherwise gcc will generate calls to library functions. Ian