Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JITLink][ELF] Support duplicated section names from object file
ELF object files can contain duplicated sections (thus section symbols as well), espeically when comdats/section groups are present. This patch adds support for generating LinkGraph from object files that have duplicated section names. This is the first step to properly model comdats/section groups. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D114753
- Loading branch information
1 parent
347d4d7
commit 091e364
Showing
5 changed files
with
72 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t | ||
// RUN: llvm-jitlink -noexec %t | ||
|
||
.section .foo,"axG",@progbits,g1,comdat | ||
.globl g1 | ||
g1: | ||
call test1 | ||
retq | ||
|
||
.section .baz,"axG",@progbits,g1,comdat | ||
test1: | ||
retq | ||
|
||
.section .bar,"axG",@progbits,g2,comdat | ||
.globl g2 | ||
g2: | ||
call test2 | ||
retq | ||
|
||
.section .baz,"axG",@progbits,g2,comdat | ||
test2: | ||
retq | ||
|
||
.text | ||
.globl main | ||
main: | ||
retq |