[PATCH] Set non_ir_ref_dynamic if a symbol is made dynamic
Christophe Lyon
christophe.lyon@linaro.org
Tue Mar 20 16:09:00 GMT 2018
On 20 March 2018 at 16:39, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Tue, Mar 20, 2018 at 8:00 AM, Christophe Lyon
> <christophe.lyon@linaro.org> wrote:
>> On 20 March 2018 at 14:11, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> On Tue, Mar 20, 2018 at 6:08 AM, Christophe Lyon
>>> <christophe.lyon@linaro.org> wrote:
>>>> On 20 March 2018 at 14:01, H.J. Lu <hjl.tools@gmail.com> wrote:
>>>>> On Tue, Mar 20, 2018 at 5:54 AM, Christophe Lyon
>>>>> <christophe.lyon@linaro.org> wrote:
>>>>>> On 20 March 2018 at 12:00, Nick Clifton <nickc@redhat.com> wrote:
>>>>>>> Hi H.J.
>>>>>>>
>>>>>>>> Checked into master. Nick, is this OK to backport to 2.30 branch?
>>>>>>>
>>>>>>> Yes - please go ahead and check it in.
>>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Since this was checked-in in master, I've noticed
>>>>>> FAIL:Build pr22983
>>>>>> on native ARM targets.
>>>>>> It passes on AArch64 though.
>>>>>>
>>>>>> Can you check/fix?
>>>>>>
>>>>>
>>>>> I don't have arm machine. Please show the ld log.
>>>>>
>>>>>
>>>>
>>>> Sure, I can see:
>>>>
>>>> regexp_diff match failure
>>>> regexp "^ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT
>>>> +[0-9]+ +func_attr_used_disabled$"
>>>> line " 6: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2)"
>>>> FAIL: Build pr22983
>>>
>>> Please show "readelf --dyn-syms --wide tmpdir/pr22983"
>>>
>>
>> Sorry for the delay, as it was an automated build, I needed a bit of
>> time to reproduce it manually:
>> Symbol table '.dynsym' contains 9 entries:
>> Num: Value Size Type Bind Vis Ndx Name
>> 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
>> 1: 00000000 0 NOTYPE WEAK DEFAULT UND __gmon_start__
>> 2: 0002102c 4 OBJECT GLOBAL DEFAULT 23 var_attr_used_enabled
>> 3: 00021028 4 OBJECT GLOBAL DEFAULT 23 var_attr_used_disabled
>> 4: 00000000 0 FUNC GLOBAL DEFAULT UND __printf_chk@GLIBC_2.4 (2)
>> 5: 000104f5 4 FUNC GLOBAL DEFAULT 13 func_attr_used_enabled
>> 6: 00000000 0 FUNC GLOBAL DEFAULT UND abort@GLIBC_2.4 (2)
>> 7: 00000000 0 FUNC GLOBAL DEFAULT UND
>> __libc_start_main@GLIBC_2.4 (2)
>> 8: 000104f9 4 FUNC GLOBAL DEFAULT 13 func_attr_used_disabled
>>
>>
>> So the problem is that func_attr_used_enabled and
>> func_attr_used_disabled do not appear next to each other.
>>
>> This does the trick:
>> diff --git a/ld/testsuite/ld-plugin/pr22983.d b/ld/testsuite/ld-plugin/pr22983.d
>> index af1d710..d75a26b 100644
>> --- a/ld/testsuite/ld-plugin/pr22983.d
>> +++ b/ld/testsuite/ld-plugin/pr22983.d
>> @@ -5,5 +5,6 @@ Symbol table '\.dynsym' contains [0-9]+ entries:
>> +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+
>> +var_attr_used_disabled
>> #...
>> +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+
>> +func_attr_used_enabled
>> +#...
>> +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +FUNC +GLOBAL +DEFAULT +[0-9]+
>> +func_attr_used_disabled
>> #...
>>
>
> Please try this.
>
It works for me, thanks
Christophe
> --
> H.J.
More information about the Binutils
mailing list