[PATCH] D65478: Create unique, but identically-named ELF sections for explicitly-sectioned functions and globals when using -function-sections and -data-sections.

Rahman Lavaee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 7 15:19:25 PDT 2019


rahmanl added a comment.

In D65478#1619713 <https://reviews.llvm.org/D65478#1619713>, @inglorion wrote:

> Unfortunately, this causes some problems. It looks like the sections are created with different attributes than the original. This causes problems such as sections being writable when the original was read-only, including https://crbug.com/990942 where that causes program crashes. There is some more discussion on that bug report.
>
> I'll revert this to unbreak the Chromium build, and we can come up with a way forward from there.


Hi Bob, 
We plan to gate this feature behind a condition: https://reviews.llvm.org/D65837 
I think in the Chromium case, what it needs is the -funique-section-names. More precisely, Chromium needs this flag only for the explicitly defined section "protected_memory", but I don't think it hurts to do it globally ( Chromium build may actually be using this flag anyways. Please confirm.)
If you think that the chromium build could use this flag, I will change D65837 <https://reviews.llvm.org/D65837> to do the check.

Please take a look at https://reviews.llvm.org/D65837 for our


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65478/new/

https://reviews.llvm.org/D65478





More information about the llvm-commits mailing list