[PATCH] ld: ensure build-id is placed near ELF headers

Hans-Peter Nilsson hp@bitrange.com
Wed Sep 11 11:39:02 GMT 2024


On Wed, 11 Sep 2024, Nick Clifton wrote:

> 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.

Those are separate commands, not arguments evaluated by "if", so 
to speak.  (TL;DR: yes)

brgds, H-P


More information about the Binutils mailing list