🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.codewarrior
3 messages
3 total messages Started by Raymond Fri, 24 Jan 2003 00:44
redo_prebinding ?
#866
Author: Raymond
Date: Fri, 24 Jan 2003 00:44
35 lines
2785 bytes
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")

Has anyone tackled anything like this?
There must be a right way to architect a system such as I have described...
Can you suggest some way of using CW 8 to solve this library conflict?

Thank you for your time
ray

CW 8.3 (IDE 5.1.1, Build 1108)
MacOSX 10.1.5
Re: redo_prebinding ?
#867
Author: Sean McBride
Date: Fri, 24 Jan 2003 03:14
26 lines
1957 bytes
In article <D%%X9.572$XV3.3763597586@newssvr17.news.prodigy.com>,
 "Raymond" <ray@powerproduction.com> wrote:

> 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")
> 
> Has anyone tackled anything like this?

I can only say that similar messages appear for me too... Often I'll 
clean the project, build again, and all is well. :)
Re: redo_prebinding ?
#868
Author: MW Ron
Date: Fri, 24 Jan 2003 15:18
48 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads