[PATCH] D79668: [lld-macho] Support -order_file
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 15 20:37:11 PDT 2020
int3 marked 13 inline comments as done.
int3 added inline comments.
================
Comment at: lld/test/MachO/order-file.s:61
+
+# RUN: echo "_bar" > %t/ord8
+# RUN: echo "_main" >> %t/ord8
----------------
int3 wrote:
> smeenai wrote:
> > Probably worth adding a comment about what's going on here ... it took me a bit to understand it.
> >
> > With multiple symbols pointing to the same location, I think it's technically arbitrary which one `llvm-objdump` chooses to display, but it seems like it's just picking the first name, so that works for us.
> >
> > Is the intention here that `_foo` and `_bar` are different symbols in the same section (and they'd be split into their own sections once we have subsections via symbols), or that they're aliases to the same symbol (and therefore ordering one should order the other)?
> > they're aliases to the same symbol (and therefore ordering one should order the other)?
>
> This latter one is the reason. The subsections code actually looks for and avoids creating a new subsection when two symbols alias the same location.
I'll make `_bar` non-global so the objdump output will be unambiguous
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79668/new/
https://reviews.llvm.org/D79668
More information about the llvm-commits
mailing list