[llvm-commits] Update DefinedAtom::contentType

Michael Spencer bigcheesegs at gmail.com
Fri Sep 28 14:05:39 PDT 2012


On Thu, Sep 27, 2012 at 6:27 PM, Sid Manning <sidneym at codeaurora.org> wrote:
> On 09/27/12 16:04, Michael Spencer wrote:
>>
>> On Thu, Sep 27, 2012 at 12:59 PM, Sid Manning<sidneym at codeaurora.org>
>> wrote:
>>>
>>> The original code was was not handling typeData.
>>>
>>> This changes DefinedAtom::contentType to align more-or-less with what
>>> ELF.h's getSymbolNMTypeChar does.
>>>
>>> --
>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>>> by
>>> The Linux Foundation
>>
>>
>>> Index: ReaderELF.cpp
>>> ===================================================================
>>> --- ReaderELF.cpp       (revision 164787)
>>> +++ ReaderELF.cpp       (working copy)
>>> @@ -278,17 +278,36 @@
>>>
>>>     virtual ContentType contentType() const {
>>
>> ,
>>>
>>> -    if (_symbol->getType() == llvm::ELF::STT_FUNC)
>>> -      return typeCode;
>>> +    ContentType ret=typeUnknown;
>>
>>
>> Spaces around =.
>
>
> Fixed this and the one below.
>
>>
> ...
>
>>>
>>
>> Also, tests?
>
>
> Tests have been added to what is now attached.  One test does fail,
> sections.objtxt.  The ordering of output sections will be different and you
> will see a blank section name.  When the Writer is updated (and that patch
> should come shortly) Atoms with, sectionBasedOnContent with end up in either
> bss or sbss and that blank section will not be present.

The tests need to always pass.

>
> I also added a new option to lld-core, -arch so that specific architectures
> could be selected.  I know that lld-core will need to expand to support
> other ELF archs but right now its only hexagon and i386.
>
> On the testing front I think that TestingHelpers.hpp will need to be
> updated.  Right now very few relocation-fixup types are represented, it
> would be nice if the relocation types could come from object file header.

Just stuff what is needed in there for now. This will be fixed
properly when we have a driver.

>
>>
>> - Michael Spencer
>
>
>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by
> The Linux Foundation

This looks fine with the test fixed.

- Michael Spencer



More information about the llvm-commits mailing list