[PATCH] D22516: [ELF] - Fix an issue when 2 output sections were created from single declaration in script
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 08:35:47 PDT 2016
>I don't thin the difference is script versus non-script. gold and bfd
>will always ignore some flags when merging sections, gold ignores
>SHF_WRITE and SHF_EXECINSTR.
>
>If I try your example with two files, one with
>
> .section .foo, "aT"
>
>and the other with
>
> .section .foo, "aw"
>
>gold will create two sections named foo in the output.
>
>The ELF spec explicitly says that "In the first phase, input sections
>that match in name, type and attribute flags should be concatenated
>into single sections.". Another reason is that it avoid polluting the
>flags of other sections. If just a single file needs a rw .text
>section, it can have it without causing all other .text section to be
>rw.
>
>Have you hit this problem is some existing project?
Nope, I just was thinking that if script is given then layout should
be done exactly like it was written.
I mean one output section declaration produces one output.
Though after your explanation,
now I do not sure we should try to do that.
>Cheers,
>Rafael
More information about the llvm-commits
mailing list