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

llvm-objcopy prints wrong path when output directory doesn't exist #125113

Open
srpape opened this issue Jan 30, 2025 · 2 comments · May be fixed by #125345
Open

llvm-objcopy prints wrong path when output directory doesn't exist #125113

srpape opened this issue Jan 30, 2025 · 2 comments · May be fixed by #125345

Comments

@srpape
Copy link

srpape commented Jan 30, 2025

When the output directory doesn't exist, llvm-objcopy prints the input argument in the error string.
Tested with llvm-objcopy-19.

Example to reproduce:

# We get permission denied if we try to use /usr/bin/ls directly
$ cp /usr/bin/ls ./ls

# ./invalid-dir does not exist, we get an incorrect error message
$ llvm-objcopy-19 --dump-section .text=./invalid-dir/text ./ls 
llvm-objcopy-19: error: './ls': No such file or directory

# If we create the directory, it will succeed
$ mkdir invalid-dir
$ llvm-objcopy-19 --dump-section .text=./invalid-dir/text ./ls #succeeds
@llvmbot
Copy link
Member

llvmbot commented Jan 30, 2025

@llvm/issue-subscribers-tools-llvm-objcopy-strip

Author: None (srpape)

When the output directory doesn't exist, llvm-objcopy prints the input argument in the error string. Tested with llvm-objcopy-19.

Example to reproduce:

# We get permission denied if we try to use /usr/bin/ls directly
$ cp /usr/bin/ls ./ls

# ./invalid-dir does not exist, we get an incorrect error message
$ llvm-objcopy-19 --dump-section .text=./invalid-dir/text ./ls 
llvm-objcopy-19: error: './ls': No such file or directory

# If we create the directory, it will succeed
$ mkdir invalid-dir
$ llvm-objcopy-19 --dump-section .text=./invalid-dir/text ./ls #succeeds

@AmrDeveloper
Copy link
Member

Interested, I will work on it

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