bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/26083] cris linker generate zero sized PLTRELSZ


From: hp at sourceware dot org
Subject: [Bug ld/26083] cris linker generate zero sized PLTRELSZ
Date: Sun, 07 Jun 2020 20:44:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=26083

Hans-Peter Nilsson <hp at sourceware dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Hans-Peter Nilsson <hp at sourceware dot org> ---
(In reply to H.J. Lu from comment #0)
...
>  0x00000002 (PLTRELSZ)                   0 (bytes) <<<< Is it really needed?
>  0x00000014 (PLTREL)                     RELA
>  0x00000017 (JMPREL)                     0x194
...

I'd say yes, according to the 2001 gABI draft I see at
<https://refspecs.linuxfoundation.org/elf/gabi4+/ch5.dynamic.html#dynamic_section>.
 While DT_PLTRELSZ is listed as optional in the table named "Figure 5-10:
Dynamic Array Tags, d_tag", there's also a description in the section after
that, which says "If an entry of type DT_JMPREL is present, a DT_PLTRELSZ must
accompany it".

Pragmatically, I see the consensus of the rest of the world is that it's
actually optional and its absence is to be treated as the value 0, in
particular since your 2017 commit to glibc to that effect. :)

I don't mind to have it that way, but I'm not sure it's as easy to remove as
just an extra if-clause in elf_cris_finish_dynamic_sections, as room has to be
allocated for it in elf_cris_finish_dynamic_sections, when it's value is
unknown.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]