[PATCH] ld: ensure build-id is placed near ELF headers
Nick Clifton
nickc@redhat.com
Wed Sep 11 10:42:36 GMT 2024
Hi Hans-Peter,
>>> if test -z "${SEPARATE_CODE}" -o -z "${NON_ALLOC_DYN}${SEPARATE_CODE}"; then
>>> align_text
>>> fi
>>>
>
> IIRC, "test A -o B" is frowned upon as non-portable, and IIRC
> mattered for some shell used even in today's day and age.
>
> I'd suggest to please use "test A || test B".
Can you use || inside an if-expression (in bash) ? I thought not.
Maybe it would be simpler, if somewhat wordier, to use:
# We only need the alignment if we have emitted some sections.
if test -z "${SEPARATE_CODE}"; then
align_text
elif test -z "${NON_ALLOC_DYN}${SEPARATE_CODE}"; then
align_text
fi
Cheers
Nick
More information about the Binutils
mailing list