This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH] mips/o32: fix internal_syscall5/6/7


On Fri, 18 Aug 2017, Aurelien Jarno wrote:

> > > I am using GCC 6, so if the fix went in GCC 7, that's normal the issue
> > > is present.
> > 
> >  OK then; you can use the workaround I suggested to verify MIPS16 
> > compilation then.
> 
> The workaround didn't work.

 Hmm, that means there's something wrong with binutils which needs fixing.  
Can you please send me the failing .s file and the command line used to 
assemble it (from `gcc -v')?

> > > That's an interesting idea. If we use a different stub depending on the
> > > number of arguments, we can actually pass the syscall number last, which
> > > is probably more readable. Could also be used for mips16 in all cases?
> > 
> >  MIPS16 wrappers do that already, which is also why there is an individual 
> > one for each syscall argument count.
> 
> Please find below a new patch implementing that. It started to be
> complicated to get the MIPS16 related defines used to build the 
> equivalent code through GCC to work, so I decided to also implement
> __libc_do_syscall0 to __libc_do_syscall4 in libc-do-syscall.S. I looked
> at the original code generated by GCC, it's very similar to what I used,
> sometimes just a bit longer (sometimes GCC saves the syscall number to
> the stack to reload it just after).

 The MIPS16 wrappers were split into individual files so that only ones 
that are actually used by `ld.so' are pulled.  I think it would be good if 
we preserved that.  I'll see if I can experiment with keeping the original 
MIPS16 0-3 wrappers.

  Maciej


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