[PATCH] D14567: [ELF2] - dont merge .data.rel.ro/.data.rel.ro.local into .data section.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 07:17:29 PST 2015


I am taking a look at what exactly these sections are, but in general
sections can have suffixes because of
-ffunction-section/-fdata-section.

On 12 November 2015 at 03:28, George Rimar <grimar at accesssoftek.com> wrote:
> grimar added inline comments.
>
> ================
> Comment at: ELF/Writer.cpp:465-468
> @@ -464,2 +464,6 @@
>      return ".rodata";
> +  if (S.startswith(".data.rel.ro.local"))
> +    return ".data.rel.ro.local";
> +  if (S.startswith(".data.rel.ro"))
> +    return ".data.rel.ro";
>    if (S.startswith(".data."))
> ----------------
> ruiu wrote:
>> Is this equivalent to this?
>>
>>   if (S.startswith(".data.rel.ro")
>>     return S;
> I am not sure it is. Thats depends on if something like ".data.rel.ro.1" can appear in .o files. I dont think I saw such things and dont know if that is possible. Probably someone can rely on this behavior in gold. My implementation here is similiar to what gold do and I would keep that for behavior consistency.
>
>
> http://reviews.llvm.org/D14567
>
>
>


More information about the llvm-commits mailing list