Skip to content

error: Unexpected and unsuccessful exit code in riscv64-linux zig objcopy -S, despite of actually doing the work. #23036

@vi

Description

@vi

Zig Version

0.14.0-dev.3445+6c3cbb0c8

Also happens with 0.13.0.

Does not happen with 0.11.0, but size reduction is smaller than with 0.13.0

Steps to Reproduce and Observed Behavior

$ echo 'int main(){}' > hello.c
$ /opt/zig-linux-x86_64-0.14.0-dev.3445+6c3cbb0c8/zig cc --target=riscv64-linux hello.c -o hello
$ /opt/zig-linux-x86_64-0.14.0-dev.3445+6c3cbb0c8/zig objcopy -S hello hello2
error: Unexpected
$ echo $?
1
$ ./hello
$ ./hello2
$ ls -sh hello hello2
2.0M hello  404K hello2

Expected Behavior

No error: Unexpected message and exit code 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions