This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
binutils ld 2-32, defined in discarded section error
- From: pierre willard <pierre at willard dot com>
- To: binutils at sourceware dot org
- Date: Wed, 13 Feb 2019 13:47:54 -0800
- Subject: binutils ld 2-32, defined in discarded section error
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