[PATCH] ld: ensure build-id is placed near ELF headers
Hans-Peter Nilsson
hp@bitrange.com
Tue Sep 10 23:03:55 GMT 2024
On Tue, 10 Sep 2024, Andrew Burgess wrote:
> Nick Clifton <nickc@redhat.com> writes:
> > But emit_early_ro and emit_dyn are only invoked if the corresponding test
> > *fails*. So for example:
> >
> > test -n "${SEPARATE_CODE}" || emit_early_ro
> >
> > translates to:
> >
> > if ${SEPARATE_CODE} is not empty do nothing, otherwise invoke emit_early_ro
> >
> > So the test to invoke align_text ought to be:
> >
> > 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".
brgds, H-P
More information about the Binutils
mailing list