Sameer Abu Asal via llvm-dev
2019-Aug-06 18:47 UTC
[llvm-dev] [lld] section attributes lld can use to safely drop a section from obj files
Hello llvm\lld, The autlolink feature in swift appends a section to the obj files (.swift1_autolink_entries) that is later need to determine what t link against in the final linked binary. I am trying to get rid of these section in the final linked binary at link time. I understand this could be done with (llvm-objcopy --remove-section=.swift1_autolink_entries) but would like have the linker do it. Is there an attribute I can set in that section that the linker can safely drop such a section? Thank you, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/8ac8ac00/attachment.html>
Reid Kleckner via llvm-dev
2019-Aug-06 18:52 UTC
[llvm-dev] [lld] section attributes lld can use to safely drop a section from obj files
I guess I will ask the obvious question: Can Swift be migrated to the .deplibs feature that was added to ELF LLD instead? I don't know the answer to your original question, unfortunately. On Tue, Aug 6, 2019 at 11:48 AM Sameer Abu Asal via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hello llvm\lld, > > > The autlolink feature in swift appends a section to the obj files > (.swift1_autolink_entries) that is later need to determine what t link > against in the final linked binary. > > I am trying to get rid of these section in the final linked binary at link > time. I understand this could be done with (llvm-objcopy > --remove-section=.swift1_autolink_entries) but would like have the linker > do it. > > Is there an attribute I can set in that section that the linker can safely > drop such a section? > > Thank you, > > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/c73819a8/attachment.html>
David Blaikie via llvm-dev
2019-Aug-06 19:25 UTC
[llvm-dev] [lld] section attributes lld can use to safely drop a section from obj files
Yeah, there is an attribute you can use to tell the linker to ignore a section, SHF_EXCLUDE. it was used for some DWARF stuff here: https://reviews.llvm.org/D52303 On Tue, Aug 6, 2019 at 11:52 AM Reid Kleckner via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I guess I will ask the obvious question: Can Swift be migrated to the > .deplibs feature that was added to ELF LLD instead? > > I don't know the answer to your original question, unfortunately. > > On Tue, Aug 6, 2019 at 11:48 AM Sameer Abu Asal via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hello llvm\lld, >> >> >> The autlolink feature in swift appends a section to the obj files >> (.swift1_autolink_entries) that is later need to determine what t link >> against in the final linked binary. >> >> I am trying to get rid of these section in the final linked binary at >> link time. I understand this could be done with (llvm-objcopy >> --remove-section=.swift1_autolink_entries) but would like have the linker >> do it. >> >> Is there an attribute I can set in that section that the linker can >> safely drop such a section? >> >> Thank you, >> >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190806/fd5d04ed/attachment.html>
Maybe Matching Threads
- Inlining functions from multiple assembly files
- [LLVMdev] Compiling As Obj-C or Obj-C++ On Windows
- extending an active record model with obj.extend(Module)
- has_many.collection<<obj doesn''t set attributes?
- Newbie question: Dynamic view creation from obj.to_html_form