[llvm] r259641 - [mips] Add SHF_MIPS_GPREL flag to the MIPS .sbss and .sdata sections

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 14:42:52 PST 2016


On Mon, Feb 8, 2016 at 2:16 PM, Simon Atanasyan <simon at atanasyan.com> wrote:
> On Mon, Feb 8, 2016 at 2:10 PM, Daniel Sanders
> <Daniel.Sanders at imgtec.com> wrote:
>>> The attached patch partially fixes this problem (.sdata and .sbss
>>> directives still unsupported) and converts original test case to .s
>>> form. I am not sure about correctness of the selected approach.
>>> Daniel, what do you think about that?
>
>> I definitely agree that we should be able use llvm-mc to test this. As
>> you've said, the reason we can't right now is that .sdata/.sbss aren't
>> implemented. To add to that, the reason they aren't implemented yet is
>> because they aren't needed for our first Integrated Assembler
>> milestone. This milestone will have been reached when we can recurse
>> LLVM, and assemble the linux kernel. We're pretty close on both but
>> there's a couple issues remaining.
>>
>> Your patch looks correct to me w.r.t MIPS but I've a concern for other
>> targets. I don't think ELFAsmParser::ParseSectionArguments() should be
>> adding SHF_MIPS_* values without first checking whether the target is
>> MIPS. Similarly, I don't think we should be adding special default
>> flags on targets where .sdata/.sbss aren't special.
>
> Good point. I will fix the patch and send new version for review via
> phabricator.

Here is the patch for review:
http://reviews.llvm.org/D17001

-- 
Simon Atanasyan


More information about the llvm-commits mailing list