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: PING: PATCH: Automatically test IFUNC implementations


On Thu, Oct 4, 2012 at 6:02 AM, Andreas Jaeger <aj@suse.com> wrote:
> On Wednesday, October 03, 2012 08:11:42 H.J. Lu wrote:
>> On Sat, Sep 29, 2012 at 10:31 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> > On Fri, Sep 28, 2012 at 7:25 AM, H.J. Lu <hjl.tools@gmail.com>
> wrote:
>> >> On Thu, Sep 27, 2012 at 5:16 PM, H.J. Lu <hjl.tools@gmail.com>
> wrote:
>> >>> On Thu, Sep 27, 2012 at 3:31 PM, Roland McGrath
> <roland@hack.frob.com> wrote:
>> >>>>> I thought we'd discussed returning a count from __libc_func,
>> >>>>> and the (static) array provided by the test program.
>> >>>>>
>> >>>>> Certainly that's going to be less dead bss space in libc.so.
>> >>>>
>> >>>> IMHO this feature must be done in a way that adds zero data space
>> >>>> (including zero relro const data), zero bss space, and zero
>> >>>> relocs
>> >>>> to the library.
>> >>>
>> >>> I updated hjl/ifunc/test branch.  __libc_func is now specified as:
>> >>>
>> >>> /* Fill ARRAY of MAX elements with IFUNC implementations for
>> >>> function
>> >>>
>> >>>    NAME supported on target machine and return the number of valid
>> >>>    entries.  */
>> >>>
>> >>> extern int __libc_func (const char *name, struct libc_func_test
>> >>> *array,>>>
>> >>>                         int max);
>> >>>
>> >>> arch-specific __libc_func can issue a run-time error if array is
>> >>> too
>> >
>> >>> small.   There are no .bss nor .data spaces:
>> > Here are comparisons of master branch vs. hjl/ifunc/test branch:
>> >
>> > x86-64 master branch:
>> >
>> > [hjl@gnu-tools-1 build-x86_64-linux]$ readelf -r libc.so|wc -l
>> > 1291
>> > [hjl@gnu-tools-1 build-x86_64-linux]$ readelf -SW libc.so | egrep
>> > "data|bss">
>> >   [15] .rodata           PROGBITS        000000000014da60 14da60
>> >
>> > 021ad0 00   A  0   0 32
>> >
>> >   [21] .tdata            PROGBITS        000000000039f748 19f748
>> >
>> > 000010 00 WAT  0   0  8
>> >
>> >   [22] .tbss             NOBITS          000000000039f758 19f758
>> >
>> > 000058 00 WAT  0   0  8
>> >
>> >   [27] .data.rel.ro      PROGBITS        000000000039f880 19f880
>> >
>> > 003320 00  WA  0   0 32
>> >
>> >   [31] .data             PROGBITS        00000000003a3080 1a3080
>> >
>> > 0016d8 00  WA  0   0 32
>> >
>> >   [32] .bss              NOBITS          00000000003a4760 1a4758
>> >
>> > 004520 00  WA  0   0 32
>> > [hjl@gnu-tools-1 build-x86_64-linux]$
>> >
>> > x86-64 hjl/ifunc/test branch:
>> >
>> > [hjl@gnu-tools-1 build-x86_64-linux]$ readelf -r libc.so|wc -l1291
>> > [hjl@gnu-tools-1 build-x86_64-linux]$ readelf -SW libc.so | egrep
>> > "data|bss">
>> >   [15] .rodata           PROGBITS        000000000014eb20 14eb20
>> >
>> > 022270 00   A  0   0 32
>> >
>> >   [21] .tdata            PROGBITS        00000000003a1758 1a1758
>> >
>> > 000010 00 WAT  0   0  8
>> >
>> >   [22] .tbss             NOBITS          00000000003a1768 1a1768
>> >
>> > 000058 00 WAT  0   0  8
>> >
>> >   [27] .data.rel.ro      PROGBITS        00000000003a1880 1a1880
>> >
>> > 003320 00  WA  0   0 32
>> >
>> >   [31] .data             PROGBITS        00000000003a5080 1a5080
>> >
>> > 0016d8 00  WA  0   0 32
>> >
>> >   [32] .bss              NOBITS          00000000003a6760 1a6758
>> >
>> > 004520 00  WA  0   0 32
>> > [hjl@gnu-tools-1 build-x86_64-linux]$
>> >
>> > i686 master branch:
>> >
>> > [hjl@gnu-tools-1 build-i686-linux]$ readelf -r libc.so|wc -l
>> > 1360
>> > [hjl@gnu-tools-1 build-i686-linux]$ readelf -SW libc.so | egrep
>> > "data|bss">
>> >   [15] .rodata           PROGBITS        0014d140 14d140 01eed8 00
>> >   A  0   0 32 [21] .tdata            PROGBITS        001a51fc
>> >   1a51fc 000008 00 WAT  0   0  4 [22] .tbss             NOBITS
>> >       001a5204 1a5204 000038 00 WAT  0   0  4 [27] .data.rel.ro
>> >    PROGBITS        001a52a0 1a52a0 001b1c 00  WA  0   0 32 [31]
>> >   .data             PROGBITS        001a7040 1a7040 000e9c 00  WA
>> >   0   0 32 [32] .bss              NOBITS          001a7ee0 1a7edc
>> >   002c1c 00  WA  0   0 32>
>> > [hjl@gnu-tools-1 build-i686-linux]$
>> >
>> > i686 hjl/ifunc/test branch:
>> >
>> > [hjl@gnu-tools-1 build-i686-linux]$ readelf -r libc.so|wc -l
>> > 1360
>> > [hjl@gnu-tools-1 build-i686-linux]$ readelf -SW libc.so | egrep
>> > "data|bss">
>> >   [15] .rodata           PROGBITS        0014e2a0 14e2a0 01f708 00
>> >   A  0   0 32 [21] .tdata            PROGBITS        001a6204
>> >   1a6204 000008 00 WAT  0   0  4 [22] .tbss             NOBITS
>> >       001a620c 1a620c 000038 00 WAT  0   0  4 [27] .data.rel.ro
>> >    PROGBITS        001a62a0 1a62a0 001b1c 00  WA  0   0 32 [31]
>> >   .data             PROGBITS        001a8040 1a8040 000e9c 00  WA
>> >   0   0 32 [32] .bss              NOBITS          001a8ee0 1a8edc
>> >   002c1c 00  WA  0   0 32>
>> > [hjl@gnu-tools-1 build-i686-linux]$
>> >
>> > There are no changes in run-time relocations and .data/.bss section
>> > sizes. There are about 2K increases in .rodata section for IFUNC
>> > function name strings.  OK to install?
>> >
>> > Thanks.
>>
>> PING.
>
> I think it's fine now but since Roland and Richard had comments on the
> previous versions of the patch, I'd like you to wait until Monday before
> you commit to give them a chance for an additional review.
>
> Btw. one next step would be to use this framework for the math tests. If
> you're not planning on doing this, I suggest you add this as a task to
> the glibc wiki.

I added it to:

http://sourceware.org/glibc/wiki/SmallProjects

-- 
H.J.


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