[PATCH] D74006: [MC][ELF] Make linked-to symbol name part of ELFSectionKey

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 16:04:38 PST 2020


MaskRay created this revision.
MaskRay added reviewers: eugenis, grimar, jhenderson, pcc, peter.smith.
Herald added subscribers: llvm-commits, hiraditya, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

https://bugs.llvm.org/show_bug.cgi?id=44775

This rule will be implemented by GNU as https://sourceware.org/ml/binutils/2020-02/msg00028.html

It allows us to simplify

  .section .foo,"o",foo,unique,0
  .section .foo,"o",bar,unique,1  # different section

as:

  .section .foo,"o",foo
  .section .foo,"o",bar  # different section

We consider the two `.foo` different even if the linked-to symbols foo and bar
are defined in the same section.  This is a deliberate choice so that we don't
need to know the section where foo and bar are defined beforehand.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74006

Files:
  llvm/include/llvm/MC/MCContext.h
  llvm/lib/MC/MCContext.cpp
  llvm/test/MC/ELF/comdat-dup-group-name.s
  llvm/test/MC/ELF/section-combine.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74006.242455.patch
Type: text/x-patch
Size: 5217 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200205/8abf0496/attachment.bin>


More information about the llvm-commits mailing list