[PATCH] D22683: [ELF] Symbol assignment within input section list
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 4 13:01:57 PDT 2016
Thanks, Rafael.
What platform did it fail on? I'm running x64 Ubuntu and all tests passed.
2016-08-04 22:55 GMT+03:00 Rafael Espíndola <rafael.espindola at gmail.com>:
> As written this fails end.s.
>
> The attached patch includes the previous suggestions and fixes end.s.
>
> Cheers,
> Rafael
>
>
> On 4 August 2016 at 15:45, Rafael Ávila de Espíndola
> <llvm-commits at lists.llvm.org> wrote:
> > rafael added inline comments.
> >
> > ================
> > Comment at: ELF/LinkerScript.cpp:47
> > @@ +46,3 @@
> > +template <class ELFT>
> > +static inline Symbol *addSymbolToSymtabAux(StringRef Name, uint8_t
> StOther) {
> > + return Symtab<ELFT>::X->addRegular(Name, STB_GLOBAL, StOther);
> > ----------------
> > You don't need the inline.
> >
> > ================
> > Comment at: ELF/LinkerScript.cpp:52
> > @@ +51,3 @@
> > +template <class ELFT>
> > +static inline Symbol *addSymbolToSymtabAux(StringRef Name,
> > + typename ELFT::uint Value,
> > ----------------
> > Or here .
> >
> > ================
> > Comment at: ELF/LinkerScript.cpp:59
> > @@ +58,3 @@
> > +template <class ELFT, class... ArgsT>
> > +static void addSymbolToSymtab(SymbolAssignment *Cmd, ArgsT... Args) {
> > + if (!Cmd || Cmd->Name == ".")
> > ----------------
> > Cmd can be a reference.
> >
> > ================
> > Comment at: ELF/LinkerScript.cpp:204
> > @@ -167,3 +203,3 @@
> >
> > - if (OutputName == "/DISCARD/") {
> > - for (InputSectionBase<ELFT> *S : Sections) {
> > + auto Add = [&](StringRef OutputName, const InputSectionDescription
> *I) {
> > + std::vector<InputSectionBase<ELFT> *> Sections;
> > ----------------
> > Please keep the name Cmd instead of I.
> >
> > ================
> > Comment at: ELF/LinkerScript.cpp:206
> > @@ +205,3 @@
> > + std::vector<InputSectionBase<ELFT> *> Sections;
> > + for (InputSectionBase<ELFT> *S : getInputSections(I)) {
> > + if (OutputName == "/DISCARD/") {
> > ----------------
> > You are reverting Rui's patch in here. Please assign getInputSecitons to
> the Sections vector.
> >
> >
> > https://reviews.llvm.org/D22683
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160804/f554d0ff/attachment.html>
More information about the llvm-commits
mailing list