[PATCH] D105364: [lld-macho] Drop assertions that all symbols are in GOT

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 17:54:33 PDT 2021


int3 accepted this revision.
int3 added a comment.
This revision is now accepted and ready to land.

we should be able to have just one file in the test now ;)

please also update the commit message to add a bit more detail, and mention the issue the other diff fixed too

gonna stamp this since there's been enough back and forth, but please fix all the issues before landing :)



================
Comment at: lld/test/MachO/relocs-syms-not-in-got.s:2
+# REQUIRES: x86
+## FIXME: These yaml files were  from an object file produced with 'ld -r', specifically, emulating these steps:
+## echo 'int main() {return 0;}' > foo.c
----------------
no need for FIXME, I doubt we're going to implement `ld -r` any time soon, and even if we did, I hope we don't emulate this output


================
Comment at: lld/test/MachO/relocs-syms-not-in-got.s:3-4
+## FIXME: These yaml files were  from an object file produced with 'ld -r', specifically, emulating these steps:
+## echo 'int main() {return 0;}' > foo.c
+## echo 'int bar() {return 123;}' > bar.c
+##
----------------
since we're now generating the yaml from assembly, I guess this comment should be updated


================
Comment at: lld/test/MachO/relocs-syms-not-in-got.s:9
+## ld -r -o bar.o bar_1.o
+## ld64.lld.darwinnew --error-limit=0 -dynamic  -arch x86_64  -platform_version macos  11.0.0 14.5 foo.o bar.o
+
----------------
bunch of unnecessary flags here, but I also think it's unnecessary? we're consuming the output of `ld -r`, not `lld`


================
Comment at: lld/test/MachO/relocs-syms-not-in-got.s:16
+# RUN: yaml2obj %t/bar.yaml -o %t/bar.o
+# RUN: %lld -lSystem -dynamic -arch x86_64 -platform_version macos 11.0.0 14.5 -o %t/a.out %t/foo.o %t/bar.o
+
----------------
I don't think the other flags are necessary


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105364/new/

https://reviews.llvm.org/D105364



More information about the llvm-commits mailing list