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

GCC symbol resolution fails using recent mingw-64/gcc with ASLR #83

Open
merovingien opened this issue Nov 14, 2022 · 2 comments
Open

Comments

@merovingien
Copy link

Hello,

I try to profile and analyse a program compiled with gcc 11.2 from MSys2 project, and in all my tests I get a stack but functions, source files and lines are missing (Unknown).

I think that it may be caused by ASLR that is now enabled in all recent gcc / mingw64 releases. (https://www.msys2.org/news/#2021-01-31-aslr-enabled-by-default).

I tested with a mingw / gcc 7.5 (without ASLR) and it works.

I use last MTuner release from github (v4.5.0).

Thanks in advance for your help.

@milostosic
Copy link
Collaborator

Hello,

I don't use MSys2 and related toolchains, can you provide details on how to setup the environment that matches what you have? I'd like to try and reproduce this but I'll need more info.

@mbstoner53
Copy link

mbstoner53 commented Mar 29, 2023

I am having the same problem in conjunction with gcc 12.2. I'm using mingw64 in windows 10. The toolchains setup dialog says "toolchain found!".

Everything else works but names and lines are missing. I compiled and linked with g++.exe -std=c++20 -g3.

I've tried building the .exe file with extra options like -no-pie and -Wl,--disable-dynamicbase. These don't fix the missing names.

The problem might be something to do with newer add2line.exe version. This is what my "--version" gives...

GNU addr2line (GNU Binutils) 2.39

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

No branches or pull requests

3 participants