binutils ld 2-32, defined in discarded section error

pierre willard pierre@willard.com
Wed Feb 13 21:49:00 GMT 2019


Hello,
I am using ld + /DISCARD/ script to remove some sections from a big object
file, and I get this kind of error:

`.text._ZN5boost16exception_detail12refcount_ptrINS0_20error_info_containerEE7add_refEv.isra.22'
referenced in section
`.text._ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEEC2ERKS3_[_ZN5boost16exception_detail19error_info_injectorINS_17bad_function_callEEC5ERKS3_]'
of myLib.ooo: defined in discarded section
`.text._ZN5boost16exception_detail12refcount_ptrINS0_20error_info_containerEE7add_refEv.isra.22'
of myLib.ooo

It is correct that  the section where this symbol is defined is being
discarded.
But the weird thing is that the section where this symbol is referenced is
also being discarded, so it seems ld should not be complaining.
is this correct?
regards
Pierre



More information about the Binutils mailing list