[PATCH] D14382: [ELF2] - Basic implementation of -r/--relocatable

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 23 14:36:58 PST 2016


Hm. Both your patch and mine make sense and look good, but after reading
yours, I think I slightly prefer yours because it's shorter. Let's go with
that.

My comment to Rafael's patch is that you seems to be able to move
getRelocatedSection and copyRelocations from InputSectionBase to
InputSection.

On Tue, Feb 23, 2016 at 2:13 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 23 February 2016 at 16:38, Rui Ueyama <ruiu at google.com> wrote:
> > ruiu added inline comments.
> >
> > ================
> > Comment at: ELF/InputSection.h:39
> > @@ -38,3 +38,3 @@
> >  public:
> > -  enum Kind { Regular, EHFrame, Merge, MipsReginfo };
> > +  enum Kind { Regular, RelInputSection, EHFrame, Merge, MipsReginfo };
> >    Kind SectionKind;
> > ----------------
> > So you just added RelInputSection kind? Adding a new kind and does not
> add a new class does not make sense. What I suggested was to actually
> define a new class for a relocation section. See
> http://reviews.llvm.org/D17551. I applied your patch and updated yours to
> separate the class from InputSection.
>
> I went the other way and deleted the enum :-)
>
> There is not that much specific to relocation sections. At least with
> what is currently implemented it feels natural to use InputSection and
> OutputSection for them.
>
> Let me know what you think of the attached patch.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160223/c5c43487/attachment.html>


More information about the llvm-commits mailing list