Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lld] Workaround incorrect gcc -ggdb3 .debug_macros generation like mold just did #55034

Open
Romain-Geissler-1A opened this issue Apr 22, 2022 · 4 comments
Labels

Comments

@Romain-Geissler-1A
Copy link
Member

Hi,

This issue relates to some others I had opened in the past, for a problem that seems to be in the end some incorrect .debug_macros generation by gcc when building with gcc -ggdb3.

See the historic of this issue in different projects:

@rui314 The author of mold decided to eventually workaround this in mold, depsite gcc having some debatable/wrong behavior, in this commit: rui314/mold@8c5e4df

Would it be possible to implement a similar workaround in lld so that binaries built with gcc -ggdb3 and linked with ld.lld don't end up in a huge memory/cpu hog in gdb ?

Cheers,
Romain

@llvmbot
Copy link
Collaborator

llvmbot commented Apr 22, 2022

@llvm/issue-subscribers-lld-elf

@ericriff
Copy link

Hi all,

I just came across this myself. I'm wondering if you have any plans to implement a workaround for this like mold did.

Thanks.

Eric.

@rui314
Copy link
Member

rui314 commented Jun 15, 2023

By the way, did someone file a bug to gcc so that gcc won't create a bad comdat section for -ggdb3? If so, please paste the bug's URL for cross reference.

@Romain-Geissler-1A
Copy link
Member Author

Romain-Geissler-1A commented Jun 15, 2023

Yes I have opened this gcc bug several years ago, the link is actually in the first message of this llvm issue ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants