[PATCH] D37736: [ELF] - Do not spread specific flags when emiting output sections.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 5 14:43:53 PDT 2017


George Rimar via Phabricator <reviews at reviews.llvm.org> writes:

> grimar added a comment.
>
> What about SHF_TLS flag ?
> I checked that for script below we also spread it to `my`:
>
>   SECTIONS {
>    . = 0x10000;
>    .tbss : { *(.tbss) }
>   
>    .my : { 
>      mybegin = .; 
>      . += 100;
>      myend = .;
>      }
>   }
>
> And it does not seem correct, bfd does not do that either. And this place
> looks appropriate for dropping it, isn't ?

I agree. Please add the tls testcase to the patch.

The hack is the existing code that tries to guess what are the correct
flags to use when we create a section with no corresponding input
section.

What this patch does is restrict which flags we look at in the
guessing, which I think is a good thing. It makes the hack more target,
not less.

Rui, are you OK with the patch given the above interpretation?

Cheers,
Rafael


More information about the llvm-commits mailing list