Re: objcopy -I binary etc... Was: C23 thoughts and opinions

Liste des GroupesRevenir à l c 
Sujet : Re: objcopy -I binary etc... Was: C23 thoughts and opinions
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.c
Date : 06. Jun 2024, 15:44:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86tti6ku5c.fsf@linuxsc.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
Michael S <already5chosen@yahoo.com> writes:

On Sat, 01 Jun 2024 17:22:57 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:

[..differences in gcc and clang that might be explained by ld...]

I expect you are right.  I run ld directly only rarely, and
certainly am no expert.  In my tests I was simply blindly
following the example shown in your posting (with some variations
after my attempts gave the wrong answer, trying to get it to
work).  It didn't occur to me to consider ld.
>
Using clang for the final link step always gave the right answer,
if I remember correctly.
>
I reproduced your findings.  The difference between gcc and clang is not
in ld, but in ld invocation options.
Specifically, gcc calls ld with -pie, clang calls ld without it.
gcc default behaviour can be overwritten with -no-pie switch.
I suppose that gcc4 has the same default as clang.

Makes sense.  Thank you for the explanation.

Date Sujet#  Auteur
6 Jun 24 * objcopy -I binary etc... Was: C23 thoughts and opinions2Michael S
6 Jun 24 `- Re: objcopy -I binary etc... Was: C23 thoughts and opinions1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal