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/2] Add a testcase for copy reloc against protected data


On 04/01/2015 03:55 PM, H.J. Lu wrote:
> On Wed, Apr 1, 2015 at 12:51 PM, Carlos O'Donell <carlos@redhat.com> wrote:
>> On 03/31/2015 08:26 AM, H.J. Lu wrote:
>>> On Fri, Mar 6, 2015 at 3:24 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>> On Fri, Mar 6, 2015 at 3:07 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>>>>> On Fri, 6 Mar 2015, H.J. Lu wrote:
>>>>>
>>>>>> On Fri, Mar 6, 2015 at 2:23 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>>>>>>> On Fri, 6 Mar 2015, H.J. Lu wrote:
>>>>>>>
>>>>>>>>> Suppose I configure / build with new binutils but a GCC version without
>>>>>>>>> your patches.  What will the results be?  That the tests don't build /
>>>>>>>>> run?  That they build / run but fail (best avoided if possible)?  In
>>>>>>>>> either case, you need clear documentation for architecture maintainers on
>>>>>>>>> what GCC versions (*not* requiring any uncommitted GCC patches) must be
>>>>>>>>> used to identify whether architecture-specific changes are needed and to
>>>>>>>>> test such changes.
>>>>>>>>>
>>>>>>>>
>>>>>>>> I will submit a separate patch to address GCC issue.
>>>>>>>
>>>>>>> I don't think these tests should go in glibc until:
>>>>>>
>>>>>> Which tests were you talking about?  My copy relocation
>>>>>> tests work with any GCC versions, with and without the fix
>>>>>> for
>>>>>>
>>>>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248
>>>>>
>>>>> Thanks for the explanation.  In
>>>>> <https://sourceware.org/ml/libc-alpha/2015-03/msg00170.html> you
>>>>> originally sent patches for all three of GCC, binutils, glibc, so giving
>>>>> the impression there might be dependencies between these patches.  If the
>>>>> tests work with any GCC version (i.e. fail if the architecture hasn't been
>>>>> fixed, pass if it has been fixed) then GCC changes shouldn't need to block
>>>>> them.
>>>>>
>>>>
>>>> To get copy reloc against protected data symbol working, you
>>>> need to fix glibc, binutils and GCC.  My glibc tests work around
>>>> the GCC bug so that you don't need the fixed GCC to build/test
>>>> glibc.
>>>
>>> I checked in my testcase patch.  I didn't close
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=17711
>>>
>>> since only x86 is fixed.  To fix it on a target with copy reloc, you need to
>>> properly handle ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA like
>>> x86.  You also need to fix linker if tests fail.
>>>
>>
>> I assume when you say x86 you mean all of the variants of that machine.
>>
>> Your test fail for me on F21 x86_64 with gcc 4.9.2 and ld 2.24 (Fedora
>> versions). I haven't looked into this, but hopefully we'll get Fedora--
>> specific build bots up to help with this kind of testing.
>>
>> XPASS: conform/ISO11/complex.h/conform
>> XPASS: conform/ISO11/stdalign.h/conform
>> XPASS: conform/ISO11/stdnoreturn.h/conform
>> FAIL: elf/tst-protected1a
>> FAIL: elf/tst-protected1b
>> UNRESOLVED: timezone/testdata/UTC
>> Summary of test results:
>>       2 FAIL
>>    2199 PASS
>>       1 UNRESOLVED
>>     189 XFAIL
>>       3 XPASS
>>
>> [carlos@koi build]$ cat glibc/elf/tst-protected1a.out
>> `protected1' in main and moda doesn't have same address
>> `protected3' in main and moda doesn't have same address
>> `protected1' in main doesn't have the updated value
>> `protected1' in moda has the wrong value
>> `protected3' in main doesn't have the updated value
>> `protected3' in main doesn't have the updated value
>> [carlos@koi build]$ cat glibc/elf/tst-protected1b.out
>> `protected3' in main and modb doesn't have same address
>> `protected3' in main doesn't have the updated value
>>
>> What's wrong?
>>
> 
> Linker bug.  You need linker from master or 2.25 branch.

Please mention this in the build and test issues for 2.22:

https://sourceware.org/glibc/wiki/Release/2.22#Build_and_test_issues
 
Cheers,
Carlos.


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