Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Warning Prebinding Disabled Because Dependent Library

0 views
Skip to first unread message

Bulah Amber

unread,
Dec 7, 2023, 12:25:08 AM12/7/23
to
Building a dynamic library with prebinding enabled eliminates thenormal binding overhead by predefining the library at a specifiedaddress range. When an executable or other dynamic library is builtagainst a prebound library, the linker can directly reference symbolsin the prebound library by address, instead of leaving the addressesundefined.

The static linker also records the time stamp of librariesdependent libraries. When the program is executed, the dynamic linkerchecks to see that all the build time stamps match and that theprebound address ranges of all code does not overlap. If both ofthese conditions are met, the binding of undefined references isalready done, which saves a considerable amount of time. If the timestamps don't match, or prebound executable addresses overlap, theprebinding is undone and the program is bound normally.

warning prebinding disabled because dependent library
Download https://urluso.com/2wIOKp



You do not need to relink every time the prebinding of a librarymight change. You can use the redo_prebinding(1) tool andthe update_prebinding(1) tool to update prebindings.However, in order to use these tools, you need to link againstlibraries that were initially prebound. If a library was not preboundwhen it was originally linked against, redo_prebinding(1)cannot prebind it. It must be initially built as a prebound library,as specified above.

If prebinding fails you will see a warning message in the buildlog. Prebinding has a number of requirements to allow it to work(see above). If any of these requirementsaren't met prebinding will disabled and a warning message will beprinted by the static linker when building.

/usr/bin/ld: warning prebinding disabled because of symbolsoverridden in dependent dynamic shared libraries:
/BinCache1/objc4/Objects/objc4-133.obj2/objects-optimized/objcopt.tproj/objcopt.odefinition of _swap_mach_header in section (__TEXT,__text)
/System/Library/Frameworks/System.framework/System(swap.o) definitionof _swap_mach_header

ld: warning prebinding disabled because of symbols overriddenin dependent dynamic shared libraries:
/BinCache1/PBDevKit/Objects/PBDevKit-378.1.obj2/objects-optimized/DevKit/Lowlevel.subproj_subproj.odefinition of _regcomp in section (__TEXT,__text)
/System/Library/Frameworks/System.framework/System(regcomp.o)definition of _regcomp

This happened because when cc(1) was built the Systemframework it was built against was not prebound. dyld(1) canfail trying to use prebound libraries if the program overridessymbols defined in it's dependent libraries that are used by adependent library. For example:



Currently dyld(1) only tries to use the preboundlibraries if the program uses only one prebound library. This isbecause with flat namespace libraries the checking needed to makesure all the libraries don't override any of each other symbols ismore time consuming than the optimization would generally save.

The program will run correctly but the prebinding optimizationwill be undone and the program dynamically bound as usual. Releasesfrom Apple should never be in this state. However, if you change aframework on your system you can update the dependent programs (orframeworks) without rebuilding them by runningredo_prebinding(1) on them. For example, using the caseabove:

To force the prebinding to be out of date one can runstrip(1) or nmedit(1) on one of the dependentlibraries to cause the built time stamp to be changed. A common wayto do this and not effect the symbols contained in the library is torun strip(1) with the -X option as all the localsymbols starting with 'L' are already stripped by theassembler by default.

Since prebinding requires that the entire set of libraries beinitialized when loaded, libraries may be initialized in a differentorder than they would without prebinding. This can uncover latentproblems in the order of library initializations that went undetectedwithout prebinding, particularly if there were library initializationroutines which did not explicitly call the initialization routinesfor libraries on which they depend. As a result, unexpected problemscan occur when prebinding is enabled.

Dependency injection containers introduce additional performance constraints into mobile applications. Registering and resolving types with a container has a performance cost because of the container's use of reflection for creating each type, especially if dependencies are being reconstructed for each page navigation in the app. If there are many or deep dependencies, the cost of creation can increase significantly. In addition, type registration, which usually occurs during application startup, can have a noticeable impact on startup time, dependent upon the container being used.

Overall OptionsSee section Options Controlling the Kind of Output. -c -S -E -o file-x language -v -### --help --target-help --versionC Language OptionsSee section Options Controlling C Dialect. -ansi -std=standard-fno-asm -fno-builtin -fno-builtin-function -fhosted -ffreestanding -fms-extensions -trigraphs -no-integrated-cpp -traditional -traditional-cpp -fallow-single-precision -fcond-mismatch -fsigned-bitfields -fsigned-char -funsigned-bitfields -funsigned-char -fwritable-stringsC++ Language OptionsSee section Options Controlling C++ Dialect. -fabi-version=n-fconserve-space -fno-const-strings -fno-elide-constructors -fno-enforce-eh-specs -ffor-scope -fno-for-scope -fno-gnu-keywords -fno-implicit-templates -fno-implicit-inline-templates -fno-implement-inlines -fms-extensions -fno-nonansi-builtins -fno-operator-names -fno-optional-diags -fpermissive -frepo -fno-rtti -fstats -ftemplate-depth-n -fuse-cxa-atexit -fno-weak -nostdinc++ -fno-default-inline -Wabi -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder -Weffc++ -Wno-deprecated -Wno-non-template-friend -Wold-style-cast -Woverloaded-virtual -Wno-pmf-conversions -Wsign-promoObjective-C Language OptionsSee section Options Controlling Objective-C Dialect. -fconstant-string-class=class-name -fgnu-runtime -fnext-runtime -fno-nil-receivers -fobjc-exceptions -freplace-objc-classes -fzero-link -gen-decls -Wno-protocol -Wselector -Wundeclared-selectorLanguage Independent OptionsSee section Options to Control Diagnostic Messages Formatting. -fmessage-length=n-fdiagnostics-show-location=[onceevery-line]Warning OptionsSee section Options to Request or Suppress Warnings. -fsyntax-only -pedantic -pedantic-errors -w -Wextra -Wall -Waggregate-return -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wconversion -Wno-deprecated-declarations -Wdisabled-optimization -Wno-div-by-zero -Wendif-labels -Werror -Werror-implicit-function-declaration -Wfloat-equal -Wformat -Wformat=2 -Wno-format-extra-args -Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Wno-import -Winit-self -Winline -Wno-invalid-offsetof -Winvalid-pch -Wlarger-than-len -Wlong-long -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wno-multichar -Wnonnull -Wpacked -Wpadded -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wundef -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wwrite-stringsC-only Warning Options -Wbad-function-cast -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes -Wtraditional -Wdeclaration-after-statementDebugging OptionsSee section Options for Debugging Your Program or GCC. -dletters-fdump-unnumbered -fdump-translation-unit[-n] -fdump-class-hierarchy[-n] -fdump-tree-original[-n] -fdump-tree-optimized[-n] -fdump-tree-inlined[-n] -fcallgraph-info -feliminate-dwarf2-dups -feliminate-unused-debug-types -feliminate-unused-debug-symbols -fmem-report -fprofile-arcs -frandom-seed=string -fsched-verbose=n -fstack-usage -ftest-coverage -ftime-report -g -glevel -gcoff -gdwarf-2 -ggdb -gstabs -gstabs+ -gvms -gxcoff -gxcoff+ -p -pg -print-file-name=library -print-libgcc-file-name -print-multi-directory -print-multi-lib -print-prog-name=program -print-search-dirs -Q -save-temps -timeOptimization OptionsSee section Options that Control Optimization. -falign-functions=n-falign-labels=n -falign-loops=n -fbranch-probabilities -fprofile-values -fvpt -fbranch-target-load-optimize -fbranch-target-load-optimize2 -fcaller-saves -fcprop-registers -fcse-follow-jumps -fcse-skip-blocks -fdata-sections -fdelayed-branch -fdelete-null-pointer-checks -fexpensive-optimizations -ffast-math -ffloat-store -fforce-addr -fforce-mem -ffunction-sections -fgcse -fgcse-lm -fgcse-sm -fgcse-las -floop-optimize -fcrossjumping -fif-conversion -fif-conversion2 -finline-functions -finline-limit=n -fkeep-inline-functions -fkeep-static-consts -fmerge-constants -fmerge-all-constants -fmove-all-movables -fnew-ra -fno-branch-count-reg -fno-default-inline -fno-defer-pop -fno-function-cse -fno-guess-branch-probability -fno-inline -fno-math-errno -fno-peephole -fno-peephole2 -funsafe-math-optimizations -ffinite-math-only -fno-trapping-math -fno-zero-initialized-in-bss -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls -fprefetch-loop-arrays -fprofile-generate -fprofile-use -freduce-all-givs -fregmove -frename-registers -freorder-blocks -freorder-functions -frerun-cse-after-loop -frerun-loop-opt -frounding-math -fschedule-insns -fschedule-insns2 -fno-sched-interblock -fno-sched-spec -fsched-spec-load -fsched-spec-load-dangerous -fsched-stalled-insns=n -sched-stalled-insns-dep=n -fsched2-use-superblocks -fsched2-use-traces -fsignaling-nans -fsingle-precision-constant -fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps -funroll-all-loops -funroll-loops -fpeel-loops -funswitch-loops -fold-unroll-loops -fold-unroll-all-loops --param name=value-O -O0 -O1 -O2 -O3 -OsPreprocessor OptionsSee section Options Controlling the Preprocessor. -Aquestion-A-question[=answer] -C -dD -dI -dM -dN -Dmacro[=defn] -E -H -idirafter dir -include file -imacros file -iprefix file -iwithprefix dir -iwithprefixbefore dir -isystem dir -M -MM -MF -MG -MP -MQ -MT -nostdinc -P -fworking-directory -remap -trigraphs -undef -Umacro -Wp,option -Xpreprocessor optionAssembler OptionSee section Passing Options to the Assembler. -Wa,optionLinker OptionsSee section Options for Linking. object-file-name-nostartfiles -nodefaultlibs -nostdlib -pie -s -static -static-libgcc -shared -shared-libgcc -symbolic -Wl,option -Xlinker option -u symbolDirectory OptionsSee section Options for Directory Search. -BprefixTarget OptionsSee section 3.16 Specifying Target Machine and Compiler Version. -V versionMachine Dependent OptionsSee section Hardware Models and Configurations.M680x0 Options {-m68000 -m68020 -m68020-40 -m68020-60 -m68030 -m68040 -m68060 -mcpu32 -m5200 -m68881 -mbitfield -mc68000 -mc68020 -mnobitfield -mrtd -mshort -msoft-float -mpcrel -malign-int -mstrict-align -msep-data -mno-sep-data -mshared-library-id=n -mid-shared-library -mno-id-shared-library
eebf2c3492
0 new messages