[PATCH] D68065: Propeller: LLD Support for Basic Block Sections

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 2 15:44:16 PDT 2020


MaskRay added a comment.

I have a question about `aaaaaaa.BB.foo` style labels. Are they STB_LOCAL symbol? If so,

- The assembler (MC) will generally convert relocations referencing STB_LOCAL to reference STT_SECTION instead.
- The assembler will keep them in .symtab
- The linker will retain such labels in the .symtab section in the executable/shared object unless --discard-locals is specified.
- `aaaa.BB.foo` will just be marker symbols in executables/shared objects: "hey, these addresses are special and are referenced by some instructions."
- The strip tool will drop .symtab . It seems that the executables/shared objects cannot be stripped.

Are all the items above expected?



================
Comment at: lld/test/ELF/bb-sections-delete-fallthru.s:7
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+# RUN: ld.lld  -optimize-bb-jumps %t.o -o %t.out
----------------
Drop `-pc-linux`.

I mentioned this in a previous comment.


================
Comment at: lld/test/ELF/bb-sections-delete-fallthru.s:9
+# RUN: ld.lld  -optimize-bb-jumps %t.o -o %t.out
+# RUN: llvm-objdump -d %t.out| FileCheck %s --check-prefix=CHECK
+
----------------
Drop `--check-prefix=CHECK`. It is the default.


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

https://reviews.llvm.org/D68065





More information about the llvm-commits mailing list