🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #308919

Re: Linker C nie widzi procedury assemblerowej

#308919
From: Matt D.
Date: Tue, 18 Oct 2016 20:03
22 lines
2222 bytes
On 10/18/2016 18:46, Borneq wrote:
> W dniu 17.10.2016 o 08:33, M.M. pisze:
>> No tak, bo kompilator C++ szuka nazwy zgodnej z tzw międleniem nazw.
>> Pozdrawiam
>
> A jak najlepiej zrobić coś takiego: projekt w C++ z przestrzeniami nazw
> ale mają być pliki assemblerowe, ma to kompilować się w Visualu jak GCC.
> Pliki assemblerowe będą różne w zależności od trybu 32bit czy 64bit, czy
> typu procesora a oprócz tego będzie wersja generic w C (niekoniecznie
> C++). Myślałem nad assemblerem wbudowanym w kompilator C++, ale Visual i
> GCC mają różny, a Yasm może kompilować nawet składnię GAS (rozszerzenie
> plików .s).

Tak to robi projekt OpenSSL (na dobre i na zle):
https://github.com/openssl/openssl/tree/master/crypto/perlasm

Patrz "Chapter 19:  Processor-specific code" tutaj:
https://www.openssl.org/policies/codingstyle.txt

Pozdrawiam,

Matt
Technical Details
Message-ID: <nu5v5s$gep$1@portraits.wsisiz.edu.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9baa.rev.stofanet.dk!not-for-mail
References: <ntt002$su4$1@node1.news.atman.pl> <ntt002$su4$1@node1.news.atman.pl> <almarsoft.7768711683328874933@news.v.pl> <ntvlv2$k5e$1@node1.news.atman.pl> <ntvsuu$9ke$1@portraits.wsisiz.edu.pl> <nu004f$v3c$1@node1.news.atman.pl> <nu01b1$ik$1@node1.news.atman.pl> <nu01h5$ik$2@node1.news.atman.pl> <nu0nnl$t6d$1@portraits.wsisiz.edu.pl> <nu18e5$8to$1@node1.news.atman.pl> <e6debefb-bdca-4286-81ed-32c96995bed7@googlegroups.com> <nu5jlm$m4b$1@node1.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9baa.rev.stofanet.dk!not-for-mail
From: "Matt D." <no-spam@invalid.local>
Newsgroups: pl.comp.lang.c
Subject: Re: Linker C nie widzi procedury assemblerowej
Date: Tue, 18 Oct 2016 22:03:07 +0200
Organization: http://www.wit.edu.pl
Sender: mdziubin@nospam.wsisiz.edu.pl
Message-ID: <nu5v5s$gep$1@portraits.wsisiz.edu.pl>
References: <ntt002$su4$1@node1.news.atman.pl> <ntt002$su4$1@node1.news.atman.pl> <almarsoft.7768711683328874933@news.v.pl> <ntvlv2$k5e$1@node1.news.atman.pl> <ntvsuu$9ke$1@portraits.wsisiz.edu.pl> <nu004f$v3c$1@node1.news.atman.pl> <nu01b1$ik$1@node1.news.atman.pl> <nu01h5$ik$2@node1.news.atman.pl> <nu0nnl$t6d$1@portraits.wsisiz.edu.pl> <nu18e5$8to$1@node1.news.atman.pl> <e6debefb-bdca-4286-81ed-32c96995bed7@googlegroups.com> <nu5jlm$m4b$1@node1.news.atman.pl>
Mime-Version: 1.0
Injection-Date: Tue, 18 Oct 2016 20:03:08 +0000 (UTC)
Injection-Info: portraits.wsisiz.edu.pl; posting-host="d40a9baa.rev.stofanet.dk:212.10.155.170"; logging-data="16857"; mail-complaints-to="abuse@wsisiz.edu.pl"
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
In-Reply-To: <nu5jlm$m4b$1@node1.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit