🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.asm
Article #1780

Re: REQ: połączenie programu w C z funkcją w ASM

#1780
From: asmaniak
Date: Fri, 11 Apr 2008 16:04
18 lines
1415 bytes
milion wyszesnastkował:

> /tmp/ccgJ000q.o: In function `main':
> maincc.c:(.text+0x6a): undefined reference to `fun' collect2: ld
> returned 1 exit status

> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>   i odwr.asm:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oczywiście potrzebujesz oznaczyć etykietę ‟fun” jako globalną z domyślnej lokalnej.
W odmianie AT&T asemblera ‟gcc” to byłoby proste:
.global fun
> fun:
-- 
 qo   |)      CPL: cs[0..1] (ss[0..1]) p lvl of curr code!
    _x/ ,     RPL: seg_sel[0..1] privilege lvl of seg_sel!
    |    ng  __ -- __ -- __ -- __ -- __ -- __ -- __ -x86-,
,__ -- __ -- DPL: 2._word_of_seg_desc[13..14]:`f seg_desc ,
Technical Details
Message-ID: <fto25r$tjr$1@news.mixmin.net>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!newsfeed.straub-nv.de!news.mixmin.net!not-for-mail
References: <ftli4l$kuu$2@news.ds.pg.gda.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!newsfeed.pionier.net.pl!newsfeed.straub-nv.de!news.mixmin.net!not-for-mail
From: asmaniak <rwt@psychicsdirectory.com>
Newsgroups: pl.comp.lang.asm
Subject: Re: REQ: połączenie programu w C z
 funkcją w ASM
Date: Fri, 11 Apr 2008 16:04:14 +0000 (UTC)
Organization: opRWTng
Lines: 18
Message-ID: <fto25r$tjr$1@news.mixmin.net>
References: <ftli4l$kuu$2@news.ds.pg.gda.pl>
NNTP-Posting-Host: cc82f123382bdd1fab7eb171c707c2b2
Mime-Version: 1.0
X-Complaints-To: abuse@mixmin.net
NNTP-Posting-Date: Fri, 11 Apr 2008 16:04:14 +0000 (UTC)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit