This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils ld 2-32, defined in discarded section error


On Wed, Feb 13, 2019 at 01:47:54PM -0800, pierre willard wrote:
> 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?

Are you certain the referencing section is being discarded?  I very
much doubt that it is.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]