Mailing List Archive

local relocation entries in non-writable section (__TEXT,__text)
I'm getting a link-time error when compiling Perl 5.8.5:

> local relocation entries in non-writable section (__TEXT,__text)

I see a lot of chatter about this from Googling, but no resolution to
the problem. What's going on here?

Thanks,
~ boyd


--
gentoo-osx@gentoo.org mailing list
Re: local relocation entries in non-writable section (__TEXT,__text) [ In reply to ]
> I'm getting a link-time error when compiling Perl 5.8.5:
>
>> local relocation entries in non-writable section (__TEXT,__text)
>
> I see a lot of chatter about this from Googling, but no resolution to
> the problem. What's going on here?
>

Well, I think it's my own fault... modifying my CFLAGS resolved the
problem.

I was using "-fast -mcpu=7450 -pipe" in my CFLAGS.

"-fast" enables "-mdynamic-no-pic", but you need to add "-fPIC" to
build dylibs.

So CFLAGS should either be

CFLAGS="-Os -mtune=7450 -pipe"

or aggressive optimization would be

CFLAGS="-fast -mtune=7450 -pipe -fPIC"

~ boyd



--
gentoo-osx@gentoo.org mailing list