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 2/4] Alpha: Fix the RLIM_INFINITY and RLIM64_INFINITY constants


On 2017-12-31 17:33, Adhemerval Zanella wrote:
> 
> 
> On 30/12/2017 16:44, Aurelien Jarno wrote:
> > Fix the RLIM_INFINITY and RLIM64_INFINITY constants on alpha to match
> > the kernel one and all other architectures. Change the getrlimit,
> > getrlimit64, setrlimit, setrlimit64 into old compat symbols, and provide
> > the Linux generic functions as GLIBC_2_27 version.
> > 
> > Note that the alpha implementation does not include the generic
> > getrlimit64.c or setrlimit64.c as they:
> > - redefine SHLIB_COMPAT when __RLIM_T_MATCHES_RLIM64_T == 1
> > - redefine getrlimit or setrlimit, not allowing to rename them into
> >   __new_getrlimit or __new_setrlimit.
> 
> I think we can work this around to avoid code duplication with the following
> patch (based on this one plus the previous one you posted). Basically:
> 
>   * it adds a new define, USE_VERSIONED_RLIMIT, which supress the alias to the 
>     exported symbols on generic implementation (since alpha will add the
>     versioned one instead).
> 
>   * it simplifies the SHLIB_COMPAT macros on alpha since there is no need to 
>     check for both GLIBC_2_0 and GLIBC_2_1 (it is already an arch-specific
>     file which assumes an already defined ABI, in this case GLIBC_2_0).
> 
>   * it adds a weak_alias alias between __getrlimit64 and __GI_getrlimit64
>     for alpha case to follow generic case with libc_hidden_weak definition.
> 
> What do you think?

Thanks, this looks all good to me, and works as expected. I am currently
writing a test to catch this kind of issues. I'll send the new patches
when it's done. I have already committed the patches 3 & 4.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net


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