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

Fix open flags for rdi_from_dwarf #327

Closed

Conversation

tf2spi
Copy link

@tf2spi tf2spi commented Oct 12, 2024

Hello all,

When experimenting with rdi_from_dwarf on Linux, I noticed that it failed to compile initially because clang handles __VA_ARGS__ differently on Linux than it does (for whatever reason...). After that, I tested rdi_from_dwarf with the following command line and got this as a response

$ build/rdi_from_dwarf --elf:build/rdi_from_dwarf --dump
error(input): could not load input file 'build/rdi_from_dwarf'

After an strace, I found the problem to be that os_file_open always used O_RDWR. This patch fixes lnx_flags to use O_RDONLY and O_WRONLY when appropriate.

@ryanfleury
Copy link
Collaborator

Fixed in 8f91ec4.

@ryanfleury ryanfleury closed this Dec 16, 2024
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

Successfully merging this pull request may close these issues.

2 participants