Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140717034610.GA12293@chokladfabriken.org>
Date: Thu, 17 Jul 2014 06:46:15 +0300
From: Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>
To: Szabolcs Nagy <nsz@...t70.net>
Cc: musl@...ts.openwall.com
Subject: Re: [PATCH] add or1k (OpenRISC 1000) architecture port

On Thu, Jul 17, 2014 at 12:51:59AM +0200, Szabolcs Nagy wrote:
> 
> can i ask what version of the kernel headers did you use
> to prepare the bits headers?
> 

I used the 3.15 release.

> > +++ b/arch/or1k/bits/syscall.h
> > @@ -0,0 +1,523 @@
> ...
> > +#define __NR_kcmp 272
> > +#define __NR_finit_module 273
> > +#define __NR_syscalls 274
> 
> other archs don't define __NR_syscalls for the number of syscalls
> (but it does not hurt)
> 
> ...
> > +#define SYS_kcmp __NR_kcmp
> > +#define SYS_finit_module __NR_finit_module
> > +#define SYS_syscalls __NR_syscalls
> 
> the syscall numbers after this are out-of-order
> (this will be confusing when new syscalls will be added)
> 
> i'd prefer if __NR_* and SYS_* were in the same order
> (can be fixed after the great commit)
> 

Right, I generated this from the linux header (which explains the odd
'SYS_syscall' define) and then manually fixed up the ordering.
Obviously I missed some.

I'd prefer fix it up before the commit, that's (one of) the benefit(s)
of pre-commit review after all.

I'll send an updated patch with the order fixed and the superflous
defines removed.

> > +#define SYS_fcntl64 __NR_fcntl64
> > +#define SYS_statfs64 __NR_statfs64
> > +#define SYS_fstatfs64 __NR_fstatfs64
> ...
> 
> 
> > +++ b/configure
> > @@ -250,6 +250,7 @@ x86_64-x32*|x32*|x86_64*x32) ARCH=x32 ;;
> >  x86_64*) ARCH=x86_64 ;;
> >  mips*) ARCH=mips ;;
> >  microblaze*) ARCH=microblaze ;;
> > +or1k*) ARCH=or1k ;;
> 
> i assume or1k is the official name all toolchain things use
> 
> > +++ b/include/elf.h
> > @@ -209,7 +209,7 @@ typedef struct {
> >  #define EM_MN10300	89
> >  #define EM_MN10200	90
> >  #define EM_PJ		91
> > -#define EM_OPENRISC	92
> > +#define EM_OR1K		92
> 
> glibc has EM_OPENRISC defined since 2001 and
> the binutils i have here seems to use the same name
> 
> is this change official?
> 
> > +#define R_OR1K_NONE		0
> > +#define R_OR1K_32		1
> > +#define R_OR1K_16		2
> ...
> 
> ditto, i don't see these in binutils, but i guess
> it's a new elf platform

Yes, or1k is the official name, the related binutils commit is here:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=73589c9dbddc7906fa6a150f2a2a0ff6b746e8ba

Stefan

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.