Page MenuHomePhabricator

lldProject
ActivePublic

Watchers

  • This project does not have any watchers.

Details

Description

LLVM Linker

Recent Activity

Today

tstellar added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 4:06 PM · lld, Restricted Project, Restricted Project
rnk added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 3:08 PM · lld, Restricted Project, Restricted Project
aganea added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 2:25 PM · lld, Restricted Project, Restricted Project
rnk added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 1:57 PM · lld, Restricted Project, Restricted Project
tstellar added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 1:14 PM · lld, Restricted Project, Restricted Project
aganea added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 1:04 PM · lld, Restricted Project, Restricted Project
aganea updated the diff for D61046: Fix compilation warnings when compiling with GCC 7.3.

Adressed some of the comments.

Wed, Apr 24, 1:04 PM · lld, Restricted Project, Restricted Project
nikic added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 10:04 AM · lld, Restricted Project, Restricted Project
shafik added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 9:58 AM · lld, Restricted Project, Restricted Project
nikic added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Wed, Apr 24, 12:30 AM · lld, Restricted Project, Restricted Project

Yesterday

MaskRay added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Tue, Apr 23, 10:08 PM · lld, Restricted Project, Restricted Project
tstellar added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Tue, Apr 23, 6:19 PM · lld, Restricted Project, Restricted Project
aganea updated the diff for D61046: Fix compilation warnings when compiling with GCC 7.3.
Tue, Apr 23, 5:21 PM · lld, Restricted Project, Restricted Project
aganea added inline comments to D61046: Fix compilation warnings when compiling with GCC 7.3.
Tue, Apr 23, 5:07 PM · lld, Restricted Project, Restricted Project
aganea created D61046: Fix compilation warnings when compiling with GCC 7.3.
Tue, Apr 23, 5:03 PM · lld, Restricted Project, Restricted Project

Mon, Apr 22

avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I find a previous discussion at https://bugs.llvm.org/show_bug.cgi?id=37212 and https://reviews.llvm.org/D46502

Mon, Apr 22, 7:25 AM · lld, Restricted Project

Sun, Apr 21

MaskRay added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I find a previous discussion at https://bugs.llvm.org/show_bug.cgi?id=37212 and https://reviews.llvm.org/D46502

Sun, Apr 21, 11:11 PM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

ping.

Sun, Apr 21, 11:05 PM · lld, Restricted Project

Mon, Apr 15

avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

Existing tools have learned various heuristics to avoid 0 DW_AT_low_pc collision, but I am not sure what they'd do if those relocations resolve to -1. llvm-symbolizer is certainly good (I have checked a few >examples - I'm learning it recently), but what about other tools?

Mon, Apr 15, 11:26 PM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

@ruiu What do you think about using UINT64_MAX-1 as address to which relocations for deleted sections would be resolved ? Does it make sense ?

Mon, Apr 15, 10:50 PM · lld, Restricted Project
MaskRay added a reviewer for D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used: MaskRay.
Mon, Apr 15, 10:24 PM · lld, Restricted Project
MaskRay removed a reviewer for D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used: MaskRay.
Mon, Apr 15, 10:24 PM · lld, Restricted Project
MaskRay added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
In D59553#1463805, @avl wrote:

@MaskRay Hi, Since you changed status of review into "Needs Revision" - What changes do you think should be done ?

Mon, Apr 15, 10:23 PM · lld, Restricted Project
avl requested review of D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
Mon, Apr 15, 2:01 PM · lld, Restricted Project

Fri, Apr 12

avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

@MaskRay Hi, Since you changed status of review into "Needs Revision" - What changes do you think should be done ?

Fri, Apr 12, 12:46 AM · lld, Restricted Project

Wed, Apr 10

ruiu accepted D39323: [lld] Support dynamic linking in RISC-V.

LGTM

Wed, Apr 10, 5:35 AM · Restricted Project, lld
PkmX updated the diff for D39323: [lld] Support dynamic linking in RISC-V.

Addressed the review comments:

Wed, Apr 10, 4:30 AM · Restricted Project, lld
ruiu closed D54747: Discard debuginfo for object files empty after GC.
Wed, Apr 10, 3:35 AM · Restricted Project, lld
ruiu accepted D39324: [lld] Support TLS in RISC-V.

LGTM

Wed, Apr 10, 3:29 AM · lld
ruiu added a comment to D54747: Discard debuginfo for object files empty after GC.

I will do that.

Wed, Apr 10, 3:27 AM · Restricted Project, lld
ruiu added a comment to D39323: [lld] Support dynamic linking in RISC-V.

Overall looking good.

Wed, Apr 10, 3:27 AM · Restricted Project, lld
avl added inline comments to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
Wed, Apr 10, 3:20 AM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
In D59553#1459554, @avl wrote:
  1. on some platforms 0 is a valid address. i.e. image base starts from 0. In that case no way to differentiate valid address from invalid one just by checking for 0.

But this is also true to UINT64_MAX-2 because you can put your code or data there, no?

Wed, Apr 10, 3:12 AM · lld, Restricted Project
rocallahan added a comment to D54747: Discard debuginfo for object files empty after GC.

I don't have commit access so I believe someone has to commit this for me?

Wed, Apr 10, 3:11 AM · Restricted Project, lld

Tue, Apr 9

ruiu accepted D54747: Discard debuginfo for object files empty after GC.

I'd write a comment explaining why we are handling debug sections in a special way, but that can be done later. Please submit. Thank you for doing this!

Tue, Apr 9, 11:45 PM · Restricted Project, lld
ruiu added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
In D59553#1459554, @avl wrote:

I thought that address 0 is a good candidate to represent an invalid address, as nullptr is usually represented by address 0. I wonder why we want to use UINT64_MAX-2 instead of 0.

using 0 in this case could lead to following problems :

  1. on some platforms 0 is a valid address. i.e. image base starts from 0. In that case no way to differentiate valid address from invalid one just by checking for 0.
Tue, Apr 9, 11:41 PM · lld, Restricted Project
MaskRay added inline comments to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
Tue, Apr 9, 8:11 PM · lld, Restricted Project
MaskRay resigned from D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.
In D59553#1460304, @avl wrote:

__libc_csu_init is in libc.a(elf-init.o) and has no debug info. It should symbolize to ?? but not_used.cpp is incorrectly returned. ?? -> not_used.cpp

I did not see that problem if this fix applied. Everything looks exactly like you expect:

nm res.out
0000000000201100 T __libc_csu_init

U __libc_start_main

00000000002010f0 T main

llvm-symbolizer -obj=res.o 0x0000000000201100
__libc_csu_init
??:0:0 <<<<<<<<<<<<<<<<<<<<<<<<<<<

llvm-symbolizer -obj=res.o 0x00000000002010f0
main
main.cpp:2:4 <<<<<<<<<<<<<<<<<<<<<<<<<<<

Did I correctly understand the problem which you are talking about?

A more serious problem is when a main.cpp symbol incorrectly resolves to not_used.cpp. I created D60470 to fix that.

Would solution from D60470 work correctly for platform where 0 is a valid virtual address ?

Tue, Apr 9, 8:08 PM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

__libc_csu_init is in libc.a(elf-init.o) and has no debug info. It should symbolize to ?? but not_used.cpp is incorrectly returned. ?? -> not_used.cpp

Tue, Apr 9, 12:32 PM · lld, Restricted Project
MaskRay added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

__libc_csu_init is in libc.a(elf-init.o) and has no debug info. It should symbolize to ?? but not_used.cpp is incorrectly returned. ?? -> not_used.cpp

Tue, Apr 9, 9:46 AM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I'm not sure if making zero DW_AT_low_pc special for executable/DSO in DWARFDebugAranges is a good idea.

Tue, Apr 9, 4:33 AM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I think the current handling in lld is quite good, no need to special case on if (!Sym.getOutputSection()). The same problem can be reproduced for ld.bfd and gold.

Tue, Apr 9, 4:09 AM · lld, Restricted Project
avl added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I thought that address 0 is a good candidate to represent an invalid address, as nullptr is usually represented by address 0. I wonder why we want to use UINT64_MAX-2 instead of 0.

Tue, Apr 9, 4:00 AM · lld, Restricted Project
rocallahan added inline comments to D54747: Discard debuginfo for object files empty after GC.
Tue, Apr 9, 3:33 AM · Restricted Project, lld
MaskRay added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

A workaround is to set a larger image base with --image-base=.

Tue, Apr 9, 2:41 AM · lld, Restricted Project
MaskRay requested changes to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

lld sets x86_64 image base to 0x200000.
A .debug_info associated with a non-discarded section has DW_AT_low_pc > 0x200000
A .debug_info associated with a discarded section has DW_AT_low_pc = 0. If its size is larger than 0x200000 => DW_AT_high_pc > image_base => the two debug info entries overlap => llvm-symbolizer locates a DIE that's not what the user expects => unexpected filename (not_used.cpp)

Tue, Apr 9, 1:57 AM · lld, Restricted Project
ruiu added a comment to D59553: [LLD][ELF][DebugInfo] llvm-symbolizer shows incorrect source line info if --gc-sections used.

I thought that address 0 is a good candidate to represent an invalid address, as nullptr is usually represented by address 0. I wonder why we want to use UINT64_MAX-2 instead of 0.

Tue, Apr 9, 12:57 AM · lld, Restricted Project
ruiu added inline comments to D54747: Discard debuginfo for object files empty after GC.
Tue, Apr 9, 12:54 AM · Restricted Project, lld
rocallahan updated the diff for D54747: Discard debuginfo for object files empty after GC.

The results are basically unchanged with the section type checks removed, so I've just gone ahead and done that.

Tue, Apr 9, 12:25 AM · Restricted Project, lld

Mon, Apr 8

rocallahan added inline comments to D54747: Discard debuginfo for object files empty after GC.
Mon, Apr 8, 11:55 PM · Restricted Project, lld