[PATCH] D27415: [ELF] - Replace MergeOutputSection with synthetic input section MergeSection.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 31 01:44:11 PST 2017


>> grimar added a comment.
>>
>> To be more clear https://reviews.llvm.org/D29217 show 2 different issues.
>>
>> 1. The main issue I am trying to solve - wrong symbols values generated in scripts like:
>>
>>   .rodata : {
>>    *(.rodata)
>>    *(.rodata.*)
>>    . = ALIGN(16);
>>    video_cards = .;
>>    *(.videocards)
>>    video_cards_end = .;
>>
>> }
>
>I think this is an independent issue. It should be possible to fix this
>even with the current infrastructure. I am taking a look to see if I am
>missing something.

Yes, as I wrote just a line below of this,
"For fixing just only that case, probably latest diff of that patch should work. " :)

And I wrote "I suggest the next thing for now: land this first as this it should help to fix the issue with script found in linux kernel.
Then we can discuss if we should fix the rest problem I mentioned earlier, which does not affect kernel for now,
but still probably worth to fix."

Sorry, I probably wrote too much text in comments and it was hard to extract the core idea.

What I also meant that if we will  have not *(.rodata.*) but *(.foo.*) then we can miss
merge optimizations with current infrastructure. That is separate issue of course,
though I wanted to be sure that patch will not do something bad. 
I am not sure how much is real to have SHF_MERGE sections that are not .rodata.* for example.
Or other possible cases which early creation of synthetic can break.
So these possible cases are very relative I think.

>Cheers,
>Rafael

George.


More information about the llvm-commits mailing list