GCC link option

来源:互联网 发布:python自动化运维平台 编辑:程序博客网 时间:2024/05/20 02:56

针对gcc未链接相关文件却编译通过的问题


The following is from http://linux.die.net/man/1/aarch64-linux-gnu-ld, for your reference.

 

--unresolved-symbols=method

Determine how tohandle unresolved symbols. There are four possible values for method:

ignore-all

Do not reportany unresolved symbols.

report-all

Report allunresolved symbols. This is the default.

ignore-in-object-files

Reportunresolved symbols that are contained in shared libraries, but ignore them ifthey come from regular object files.

ignore-in-shared-libs

Reportunresolved symbols that come from regular object files, but ignore them if theycome from shared libraries. This can be useful when creating a dynamic binaryand it is known that all the shared libraries that it should be referencing areincluded on the linker's command line.

The behaviourfor shared libraries on their own can also be controlled bythe --[no-]allow-shlib-undefined option.

Normally the linker will generate an errormessage for each reported unresolved symbol but the option --warn-unresolved-symbols canchange this to a warning.


0 0