<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.ubuntu-fr.org/extern.php?action=feed&amp;tid=377232&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Forum Ubuntu-fr.org / Comment utiliser ld avec puts?]]></title>
		<link>http://forum.ubuntu-fr.org/viewtopic.php?id=377232</link>
		<description><![CDATA[Les sujets les plus récents dans Comment utiliser ld avec puts?.]]></description>
		<lastBuildDate>Fri, 05 Feb 2010 22:19:47 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3260738#p3260738</link>
			<description><![CDATA[<div class="codebox"><pre><code>nasm -f elf hello1.asm ; ld -s hello1_asm.o -o hello1_asm</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (n3o51)]]></author>
			<pubDate>Fri, 05 Feb 2010 22:19:47 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3260738#p3260738</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259218#p3259218</link>
			<description><![CDATA[<p>extern puts est la syntaxe de nasm. Je ne connais pas celle de as.<br />Peux être peux tu faire la même chose en C et demander une sortie en asm avec gcc. Tu auras alors un programme en assembleur as - avec peut être la directive qui va bien.</p><p>- et peut être man as</p>]]></description>
			<author><![CDATA[dummy@example.com (Nasman)]]></author>
			<pubDate>Fri, 05 Feb 2010 10:42:43 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259218#p3259218</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259187#p3259187</link>
			<description><![CDATA[<p>Voila, j&#039;ai donc rajouté <em>EXTEND puts</em> en haut du code comme ceci:</p><div class="codebox"><pre><code>EXTERN puts
.text
message :
.ascii &quot;hello world ! \0&quot;
.align 4
.global _start
_start :
pushl %ebp
movl %esp,%ebp
pushl $message
call puts
addl $4,%esp
movl %ebp,%esp
popl %ebp
ret</code></pre></div><p>Mais j&#039;ai une erreur à la compilation:</p><div class="codebox"><pre><code>$ as hello1.s -o hello1.o</code></pre></div><p>renvoi:</p><div class="codebox"><pre><code>hello1.s:2: Error: no such instruction: `extern puts&#039;</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Makak_du_27)]]></author>
			<pubDate>Fri, 05 Feb 2010 10:29:46 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259187#p3259187</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259149#p3259149</link>
			<description><![CDATA[<p>Je viens de retrouver un programme quasiment identique réalisé avec nasm</p><div class="codebox"><pre><code>BITS 32
EXTERN puts
SECTION .data
        chaine      db &quot;Hello world !&quot;, 0
SECTION .text
        GLOBAL main
        main:
        push dword chaine
        call puts
        add esp, 4
        ret</code></pre></div><p>Compilation</p><div class="codebox"><pre><code>nasm -felf32 helloputs.asm -o helloputs.o</code></pre></div><p>Edition des liens</p><div class="codebox"><pre><code>gcc helloputs.o helloputs</code></pre></div><p>Exécution</p><div class="codebox"><pre><code>./helloputs</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Nasman)]]></author>
			<pubDate>Fri, 05 Feb 2010 10:08:33 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259149#p3259149</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259132#p3259132</link>
			<description><![CDATA[<p>Je pense qu&#039;il te faut déclarer puts comme extern. Je ne suis pas sur qu&#039;il faille lier la libc.so.6 au fichier (puisqu&#039;elle est dynamique).</p><p>J&#039;avais fait quelques programmes en assembleur sous l&#039;OS quon ne citera pas et il fallait juste créer l&#039;exécutable (à l&#039;édition des liens) à partir du fichier objet.</p><p>J&#039;ai du faire la même chose sous Linux mais il faut que je vérifie la chose.</p>]]></description>
			<author><![CDATA[dummy@example.com (Nasman)]]></author>
			<pubDate>Fri, 05 Feb 2010 09:55:43 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259132#p3259132</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259114#p3259114</link>
			<description><![CDATA[<p><em>file hello1</em> retourne:</p><div class="codebox"><pre><code>hello1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), not stripped</code></pre></div>]]></description>
			<author><![CDATA[dummy@example.com (Makak_du_27)]]></author>
			<pubDate>Fri, 05 Feb 2010 09:39:37 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259114#p3259114</guid>
		</item>
		<item>
			<title><![CDATA[Réponse à&#160;:  Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259093#p3259093</link>
			<description><![CDATA[<p>hello<br />que répond<br />file hello1</p>]]></description>
			<author><![CDATA[dummy@example.com (credenhill)]]></author>
			<pubDate>Fri, 05 Feb 2010 09:25:22 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259093#p3259093</guid>
		</item>
		<item>
			<title><![CDATA[Comment utiliser ld avec puts?]]></title>
			<link>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259069#p3259069</link>
			<description><![CDATA[<p>Bonjour,</p><p>Je vous expose mon problème: J&#039;ai un fichier hello1.s (contenu ci-après). Le bogue se passe à l&#039;étape d&#039;éditions des liens avec cette ligne: </p><div class="codebox"><pre><code>$ld -o hello1 /lib/libc.so.6 hello1.o -lc</code></pre></div><p>On lie <em>/lib/libc.so.6</em> pour puts. Au final, j&#039;ai bien un fichier exécutable hello1 mais lorsque j&#039;essaie de l&#039;exécuter, le bash me retourne:</p><div class="codebox"><pre><code>bash: ./hello1: Aucun fichier ou répertoire de ce type</code></pre></div><p>Pourriez-vous me dire ce qu&#039;il se passe?<br />Merci,<br />Cordialement,<br />Makak_du_27 <img src="http://forum.ubuntu-fr.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><div class="codebox"><pre><code>.text
message :
.ascii &quot;hello world ! \0&quot;
.align 4
.global _start
_start :
pushl %ebp
movl %esp,%ebp
pushl $message
call puts
addl $4,%esp
movl %ebp,%esp
popl %ebp
ret</code></pre></div><p>PS: Cela fonctionnait il y a à peu près trois ans...</p>]]></description>
			<author><![CDATA[dummy@example.com (Makak_du_27)]]></author>
			<pubDate>Fri, 05 Feb 2010 09:07:15 +0000</pubDate>
			<guid>http://forum.ubuntu-fr.org/viewtopic.php?pid=3259069#p3259069</guid>
		</item>
	</channel>
</rss>
