Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 4 Apr 2016 12:41:08 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: [PATCH 2/2] add powerpc64 port

* Bobby Bingham <koorogi@...rogi.info> [2016-04-03 23:03:54 -0500]:
> On Sun, Mar 27, 2016 at 10:18:56PM -0400, Rich Felker wrote:
> > > > > diff --git a/arch/powerpc64/reloc.h b/arch/powerpc64/reloc.h
> > > > > new file mode 100644
> > > > > index 0000000..8e60b31
> > > > > --- /dev/null
> > > > > +++ b/arch/powerpc64/reloc.h
> > > > > @@ -0,0 +1,32 @@
> > > > > +#include <endian.h>
> > > > > +
> > > > > +#if __BYTE_ORDER == __LITTLE_ENDIAN
> > > > > +#define ENDIAN_SUFFIX "le"
> > > > > +#else
> > > > > +#define ENDIAN_SUFFIX ""
> > > > > +#endif
> > > > > +
> > > > > +#define LDSO_ARCH "powerpc64" ENDIAN_SUFFIX
> > > > 
> > > > Is it intentional that the "default" subarch variant be suffixed with
> > > > "le" and a non-default/unused one be the bare "powerpc64"? I don't
> > > > object to that but it's contrary to usual conventions that the bare
> > > > arch be the canonical ABI, and it might be contrary to what GCC is
> > > > doing now (haven't checked) for the dynamic linker name.
> > > 
> > > I'll double check, but I skimmed the gcc code here, and it looked like
> > > it uses an "le" suffix.  Admittedly, I didn't read it closely enough to
> > > be absolutely sure yet.
> > 
> > OK, sounds good. Also note that CRTJMP here needs fixing.
> 
> I checked again, and gcc does indeed use the "le" suffix.
> 
> gcc/config/rs6000/linux64.h has:
> 
> #define MUSL_DYNAMIC_LINKER64 \
>   "/lib/ld-musl-powerpc64" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1"
> 
> 
> The two places that define MUSL_DYNAMIC_LINKER_E define it like so:
> 
> gcc/config/rs6000/sysv4.h:
> 
> #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("", "le", "")
> 
> gcc/config/rs6000/sysv4le.h:
> 
> #define MUSL_DYNAMIC_LINKER_E ENDIAN_SELECT("", "le", "le")
> 

i think i just followed the 32bit logic
because 32bit and 64bit use a lot of
common code in gcc

i dont know what's the convention.
i hope this works.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.