bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/22705] New: FR: implement why-live and why-load flags


From: ppluzhnikov at google dot com
Subject: [Bug gold/22705] New: FR: implement why-live and why-load flags
Date: Fri, 12 Jan 2018 22:23:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22705

            Bug ID: 22705
           Summary: FR: implement why-live and why-load flags
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: ppluzhnikov at google dot com
                CC: ian at airs dot com
  Target Milestone: ---

It is often hard to tell why a function is being linked in.
It is even harder to tell why a function survives --gc-sections.

Apple has "-why_live" and "-why_load"
https://www.unix.com/man-page/osx/1/ld/

   Options for introspecting the linker
     -why_load   Log why each object file in a static library is loaded. That
is, what symbol was
                 needed.  Also called -whyload for compatibility.

     -why_live symbol_name
                 Logs a chain of references to symbol_name.  Only applicable
with -dead_strip .
                 It can help debug why something that you think should be dead
strip removed is
                 not removed.

Example output from https://people.freedesktop.org/~michael/why_live.filt.txt

      chart::ChartTypeTabPage::ChartTypeTabPage(Window*,
com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&,
bool, bool) from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(tp_ChartType.o)
        chart::ChartTypeTabPage::ChartTypeTabPage(Window*,
com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&,
bool, bool) from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(tp_ChartType.o)
          chart::ChartTypeDialog::ChartTypeDialog(Window*,
com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType.o)
            chart::ChartTypeDialog::ChartTypeDialog(Window*,
com::sun::star::uno::Reference<com::sun::star::frame::XModel> const&,
com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType.o)
              chart::ChartTypeUnoDlg::createDialog(Window*) from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType_UNO.o)
                vtable for chart::ChartTypeUnoDlg from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType_UNO.o)
                 
chart::ChartTypeUnoDlg::ChartTypeUnoDlg(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType_UNO.o)
                   
chart::ChartTypeUnoDlg::Create(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(dlg_ChartType_UNO.o)
                      g_entries_chart2_controller from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(_serviceregistration_controller.o)
                        _chartcontroller_component_getFactory from
/Users/tml/lo/armopt/instdir/program/libchartcontrollerlo.a(_serviceregistration_controller.o)
                          __MergedGlobals from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/lo.o
                            _lo_get_factory_map from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/lo.o
                             
cppuhelper::detail::loadSharedLibComponentFactory(rtl::OUString const&,
rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString
const&,
com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>
const&, com::sun::star::uno::XInterface*
(**)(com::sun::star::uno::XComponentContext*,
com::sun::star::uno::Sequence<com::sun::star::uno::Any> const&),
com::sun::star::uno::Reference<com::sun::star::uno::XInterface>*) from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(shlib.o)
                               
cppuhelper::ServiceManager::loadImplementation(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&, boost::shared_ptr<cppuhelper::ServiceManager::Data::Implementation>&)
from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(servicemanager.o)
                                  (anonymous
namespace)::SingletonFactory::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(servicemanager.o)
                                    non-virtual thunk to (anonymous
namespace)::SingletonFactory::createInstanceWithArgumentsAndContext(com::sun::star::uno::Sequence<com::sun::star::uno::Any>
const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>
const&) from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(servicemanager.o)
                                      vtable for (anonymous
namespace)::SingletonFactory from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(servicemanager.o)
                                       
cppuhelper::ServiceManager::addSingletonContextEntries(std::__1::vector<cppu::ContextEntry_Init,
std::__1::allocator<cppu::ContextEntry_Init> >*) from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(servicemanager.o)
                                         
cppu::defaultBootstrap_InitialComponentContext(rtl::OUString const&) from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(defaultbootstrap.o)
                                           
cppu::defaultBootstrap_InitialComponentContext() from
/Users/tml/lo/armopt/instdir/program/libuno_cppuhelpergcc3.a(defaultbootstrap.o)
                                             
desktop::Desktop::InitApplicationServiceManager() from
/Users/tml/lo/armopt/instdir/program/libsofficeapp.a(appinit.o)
                                                desktop::Desktop::Init() from
/Users/tml/lo/armopt/instdir/program/libsofficeapp.a(app.o)
                                                  vtable for desktop::Desktop
from /Users/tml/lo/armopt/instdir/program/libsofficeapp.a(app.o)
                                                   
desktop::Desktop::~Desktop() from
/Users/tml/lo/armopt/instdir/program/libsofficeapp.a(app.o)
                                                     
desktop::Desktop::~Desktop() from
/Users/tml/lo/armopt/instdir/program/libsofficeapp.a(app.o)
                                                        _soffice_main from
/Users/tml/lo/armopt/instdir/program/libsofficeapp.a(sofficemain.o)
                                                          _touch_lo_runMain
from /Users/tml/lo/armopt/instdir/program/libsofficeapp.a(sofficemain.o)
                                                            -[AppDelegate
threadMainMethod:] from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/AppDelegate.o
                                                             
l_OBJC_$_INSTANCE_METHODS_AppDelegate from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/AppDelegate.o
                                                               
l_OBJC_CLASS_RO_$_AppDelegate from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/AppDelegate.o
                                                                 
_OBJC_CLASS_$_AppDelegate from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/AppDelegate.o
                                                                   
objc-class-ref from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/main.o
                                                                      _main
from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/main.o
                                                                        _main
from
/Users/tml/lo/armopt/ios/experimental/TiledLibreOffice/build/TiledLibreOffice.build/Release-iphoneos/TiledLibreOffice.build/Objects-normal/armv7/main.o


This has been mentioned here:
https://sourceware.org/ml/binutils/2014-04/msg00255.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]