Article View: comp.sys.mac.programmer.codewarrior
Article #868Re: redo_prebinding ?
From: MW Ron
Date: Fri, 24 Jan 2003 15:18
Date: Fri, 24 Jan 2003 15:18
48 lines
3076 bytes
3076 bytes
In article <D%%X9.572$XV3.3763597586@newssvr17.news.prodigy.com>,
"Raymond" <ray@powerproduction.com> wrote:
>hi
>
>I'm building an app (MachO format) which links against a private framework
>for some core functionality. (Windowing API wrappers, etc.)
>On launch this app loads additional plugins which extend its functionality.
>( Using: CFBundleCreate & CFBundleGetFunctionPointerForName )
>
>When I compile/link these "plugin" frameworks, I see this sort of warning
>message (around 5 or 6 of them per plugin):
>
>-----------------
>dynamic library
>'@executable_path/../Frameworks/PPSFramework.framework/Versions/A/PPSFramewo
>rk' section '__TEXT' ($01000000-$01039000)
>overlaps with output file section '__TEXT' ($01000000-$01007000)
>(need to run redo_prebinding)
>----------------
>("PPSFramework" is the name of the private framework with Windowing API
>wrappers, and "output file section" is the extension plugin which gets
>dynamically loaded.)
>
>
>If I "Disable Pre-Binding" these warning go away, but boty ways my string
>literals are corrupt after loading these plugins
> (and I guess it is because of "section collision")
>
Prebinding (which is on by default), requires that all dynamic
libraries used by the application don't have addresses which overlap.
The dynamic loader can deal with the problem (which is why these are
only warnings), but the code will run slow as it will require a dynamic
fixup to it's relocations.
You should build your dynamic library with a different starting address
using the option -seg1addr long, the Metrowerks makes the default for
a .dylib to be 0x01 000000 (default for a application/executable is
0x1000). Most of the system libraries are at addresses > 0x80000000
Ron
--
Free Programming Courses at CodeWarrior U
<http://www.codewarrioru.com>
Metrowerks, maker of CodeWarrior - "Software Starts Here"
Ron Liechty - MWRon@metrowerks.com - http://www.metrowerks.com
Technical Details
Message-ID:
<mwron-52A508.10182524012003@enews.newsguy.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.he.net!cyclone-sf.pbi.net!129.250.175.17!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwronReferences:
<D%%X9.572$XV3.3763597586@newssvr17.news.prodigy.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,5d107a1c83f4de2e
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,5d107a1c83f4de2e
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2003-01-24 07:37:34 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.he.net!cyclone-sf.pbi.net!129.250.175.17!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron
From: MW Ron <mwron@metrowerks.com>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: redo_prebinding ?
Date: Fri, 24 Jan 2003 10:18:25 -0500
Organization: Metrowerks
Lines: 48
Message-ID: <mwron-52A508.10182524012003@enews.newsguy.com>
References: <D%%X9.572$XV3.3763597586@newssvr17.news.prodigy.com>
NNTP-Posting-Host: p-642.newsdawg.com
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
X-Face: )mY~XFHLw)UOW!W#[Ljvxq6Ja7(g'#F0-g*&puNxR8hEJkd@Oue/70^.)I78\
(%a%&Id211u"l/t.llWo/M|?15XUlx9!IGkdWiEmcasiyg"k;Q9[~XuE+`t2"*n(>nmm
@L/q,TjMd5+H{gASEPDR^$