Skip to content

disassembler map file problems on OpenBSD #8037

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

Closed
llvmbot opened this issue Jul 18, 2010 · 4 comments
Closed

disassembler map file problems on OpenBSD #8037

llvmbot opened this issue Jul 18, 2010 · 4 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Member

llvmbot commented Jul 18, 2010

Bugzilla Link 7665
Resolution FIXED
Resolved on Dec 16, 2011 23:25
Version trunk
OS OpenBSD
Blocks llvm/llvm-bugzilla-archive#10988
Attachments generated map file
Reporter LLVM Bugzilla Contributor
CC @asl

Extended Description

LLVM svn (108643) on OpenBSD/i386 -current doesn't seem to build:

llvm[2]: Compiling EDDisassembler.cpp for Release+Asserts build (PIC)
llvm[2]: Compiling EDInst.cpp for Release+Asserts build (PIC)
llvm[2]: Compiling EDMain.cpp for Release+Asserts build (PIC)
llvm[2]: Compiling EDOperand.cpp for Release+Asserts build (PIC)
llvm[2]: Compiling EDToken.cpp for Release+Asserts build (PIC)
llvm[2]: Linking Release+Asserts Shared Library EnhancedDisassembly.so
/usr/bin/ld:/usr/users/jsg/src/llvm/tools/edis/Release+Asserts/EnhancedDisassembly.exports.map:38: syntax error in VERSION script
collect2: ld returned 1 exit status
gmake[2]: *** [/usr/users/jsg/src/llvm/Release+Asserts/lib/libEnhancedDisassembly.so] Error 1

$ ld --version
GNU ld version 2.15

$ cc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd4.7/4.2.1/specs
Target: i386-unknown-openbsd4.7
Configured with: OpenBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719

$ libtool --version
ltmain.sh (GNU libtool) 1.5.26 (1.1220.2.493 2008/02/01 16:58:18)

@asl
Copy link
Collaborator

asl commented Jul 18, 2010

Sounds like really ancient ld.

@llvmbot
Copy link
Member Author

llvmbot commented Jul 19, 2010

This is the same version of ld FreeBSD uses. The changes between versions of binutils tend to break ld on non x86 architectures, especially when they are something other than Linux.

@llvmbot
Copy link
Member Author

llvmbot commented Mar 1, 2011

I can confirm that this OpenBSD bug is still around in llvm/clang trunk from a month ago, 124477 to be exact. For some reason the exports.map files that are generated are missing a line at the top of the file. In FreeBSD, the second line of each of these map files says "global:" but that's missing on OpenBSD. I added that in manually and clang built fine on OpenBSD 4.8 i386. Presumably some bug in the build system, but I haven't looked into where that's generated.

@llvmbot
Copy link
Member Author

llvmbot commented Dec 17, 2011

I no longer see this problem, closing.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
augusto2112 pushed a commit to augusto2112/llvm-project that referenced this issue Jan 24, 2024
To support stepping in Swift async code, LLDB uses the memory region (ie stack vs heap) 
of the Canonical Frame Address (CFA) to identify when an async function calls a 
synchronous function.

But this has resulted in a performance regression, as determining the memory region of 
the CFA is not free, and eagerly performing this query for every `StackID`, 
particularly during backtracing/unwinding – when stepping is not yet occurring, is 
wasteful.

This change proposes a solution that defers the memory region query until required to 
perform stepping logic. The logic that checks heaps vs stacks was moved into 
`ThreadPlan`, the only place that currently needs to make that determination. 
Performing this check in `ThreadPlan` provides access to the process, allowing 
stack/heap determination to happen as needed. Previously, the stack/heap determination 
was made eagerly when the `StackID` was constructed. 

rdar://117505613

(cherry-picked from commit c58c369)
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants