[llvm-commits] lld - WriterELF.cpp: Add case to SectionChunk

Michael Spencer bigcheesegs at gmail.com
Wed Sep 26 14:03:11 PDT 2012


On Wed, Sep 26, 2012 at 11:45 AM, Sid Manning <sidneym at codeaurora.org> wrote:
> On 09/26/12 11:48, Michael Spencer wrote:
>>
>> On Wed, Sep 26, 2012 at 8:51 AM, Sid Manning<sidneym at codeaurora.org>
>> wrote:
>>>
>>> This is a small change:
>>>
>>>   * Add a case for DefinedAtom::typeConstant in SectionChunk so that read
>>> only sections get created.
>>>
>>>   * Use the variable sectionName instead of ".bss" for typeZeroFill.
>>>
>>>
>>> --
>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>>> by
>>> The Linux Foundation
>>
>>
>> Can you add a test case for this? With that it's good.
>
>
> I could add a test case but there is a change to the reader that needs to
> happen in conjunction with this and that has not been committed yet.
>
> Hemant wanted to move the bulk of ReaderELF.cpp into a header, after talking
> about it, moving the code into lld/include/ReaderWriter/ReaderELF.h instead
> of adding new ReaderELF.h to ELF seemed like a better idea, what do you
> think?
>
> When I ran the test it showed me that the patch, as I submitted it, was
> missing the break statement in the newly added case.
>
>>
>> - Michael Spencer
>
>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
> The Linux Foundation

The problem with moving all the reader stuff out to a header so the
writer can access it is that it breaks going to native/yaml format.
The writer can't assume it has a ELFDefinedAtom and such.

This patch is fine to commit.

- Michael Spencer



More information about the llvm-commits mailing list