This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [powerpc] powerpc*-*-elf and -mrelocatable-lib


Hello Craig,


Howland Craig D (Craig) wrote:
> Emil:
>      I'd expect that the answer is because -mrelocatable-lib is the most
> general, working when linked with code compiled either with the same
> option, -mrelocatable, or -mno-relocatable.

I understand, but for a bare-metal, statically linked environment, this just adds a bit of overhead
(bytes and cyles) I'm trying to get rid of.

>      I've been fine with the -mrelocatable-lib, but it is possible for
> it to cause trouble (see http://www.xilinx.com/support/answers/19804.htm)
> so I would think that a patch could be worthwhile.

Agreed. I'd like my text sections not to be accessible from the data-side.

Understanding that one might find this questionable, when I try to build a powerpc64-*-elf
configuration, I get gcc complaining about -mrelocatable:

error: -mrelocatable and -mcall-linux are incompatible

One might argue that I shouldn't use a cross-compiler configured for powerpc64-unknown-linux-gnu to
generate bare-metal code, but I think that's possible and convenient from several perspectives.

I'll send out my patch soon.


Cheers,
Emil.


> 				Craig
> 
> -----Original Message-----
> From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
> On Behalf Of Emil Medve
> Sent: Wednesday, August 05, 2009 4:30 PM
> To: newlib@sources.redhat.com
> Subject: [powerpc] powerpc*-*-elf and -mrelocatable-lib
> 
> Hello,
> 
> 
> I searched through the archives and I couldn't find an answer to why is
> -mrelocatable-lib used all
> the time when building newlib for a PowerPC target.
> 
> I'm trying to use and build newlib for a bare-metal embedded application
> (powerpc*-*-elf) and I was
> wondering if anybody else would find useful a patch that would make a
> --enable-static
> --disable-shared (--without-pic ?) configuration build without ?
> 
> 
> Cheers,
> Emil.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]