#1106458 binutils: ar x should be able to use stdin as input

Package:
binutils
Source:
binutils
Description:
GNU assembler, linker and binary utilities
Submitter:
Samuel Plavec
Date:
2025-05-24 19:29:02 UTC
Severity:
normal
#1106458#5
Date:
2025-05-24 19:26:18 UTC
From:
To:
Dear Maintainer,

"ax x" is currently not able to read the input archive from stdin.
Steps to reproduce:

ar cr test.a $(mktemp test_XXXXX)
cat test.a | ar xv /dev/stdin

The following error is reported by the second command:

ar: /dev/stdin: Illegal seek

This error is caused by seeking the input by a negative offset
(https://superuser.com/questions/1480715/input-pipe-for-ar). There
should not be any technical necessity to do this, because using ar
from busybox can use input from stdin.

"ar p" is also affected.

Best regards,
Samuel Plavec