Liste des Groupes | Revenir à cl c |
On Sat, 01 Jun 2024 17:22:57 -0700
Tim Rentsch <tr.17687@z991.linuxsc.com> wrote:
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.
Les messages affichés proviennent d'usenet.