tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding asm examples



On Sun, Nov 13, 2011 at 11:19:44PM +0000, Valeriy E. Ushakov wrote:
 > I don't think that constructing standalone binaries is a good way,
 > didactically, to learn an assembler.

Right.

 > > Some other people in this thread have expressed why they think this
 > > would be valuable to them.  Granted, in the current form, the code does
 > > not cover their "use cases" yet.  The most obvious of these is having an
 > > example that shows how to write an asm function that can be called from C.
 > 
 > As I said, cc -S is your friend here.  It will give you infinite
 > examples of exactly what you want, where you use C to express what you
 > want.  Throw in -fpic, -fomit-frame-pointer etc for more fun.

I'm not convinced that reading compiler output is a good way to get
started on anything.

I also don't think hand-coding things like ".note.netbsd.ident" is
desirable in any circumstances and it certainly shouldn't be in an
*example*.

And I still object to installing these examples. For their ostensible
intended purpose they can and should live purely in the source tree.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index