| |
| |
| |
|
Comments:
<0> hello meatmanek <0> hello mwk <1> hi <0> how are you today? <2> sorry, anyone using nasm? <3> finally, nessus works ! <4> hmm can someone help me to understand: <4> # Normalize the start address <4> jmpl $BOOTSEG, $start2 <4> hmm I'm still looking for the jmpl definition, why it takes 2 arguments actually <5> you should be looking for the jmp instruction, jmpl is at&t syntax <6> __mikem: how to read about at&t syntax? <5> a bunch of instructions have a one leter postfix that denotes the size of operands <6> so jmpl = long <6> ?
<5> I guess it does, I didn't know jmp could be modified in at&t syntax <7> lookin for some help with stabs and linking c startup code ;) <8> You should ask a question. It's hard to help if we don't have any information. <7> Alright, I'll do the brief, this is concerning the gcc toolchain. <7> #define CONSTRUCTOR(name,pri) \ <7> asm(".stabs \"__INIT_LIST__\",22,0,0,__ctor_" #name); \ <7> asm(".stabs \"__INIT_LIST__\",20,0,0," #pri); \ <7> VOID __ctor_##name(VOID); \ <7> VOID __ctor_##name(VOID) <7> There are undefined symbols in 'clib2-helloworld': <7> U __EXIT_LIST__ stdlib_constructor_begin.c:0 <7> U __INIT_LIST__ stdlib_constructor_begin.c:0 <7> make: *** [clib2-helloworld] Error 1 <7> Now does the .stabs declaration create the symbol for linking automatically, or is it completely beside the point? <7> This clib2 implementation is originally written for PPC/m68k. I am trying to compile for x86 though <8> I don't think .stab creates anything linkable <8> It's for debugging, right? So it puts some type of debugging text name into your object I think <7> that is what I was wondering, and is consistent with everything I've read. But unfortunately I cannot find any reference to an INIT_LIST in the c source tree, so I was a bit perplexed. :/ <7> OK I will go ahead and try creating my own instances in c code and see if it makes everything work <8> I was just going to recommend to create a hello world C program, create ***embly source from a compile and see what was in it <7> Are you thinking the compiler might implicitly generate some of these symbols? <8> yes, the C compiler will show you every bit of what you need <7> gcc -S correct? <7> never mind got it <9> i don't think C programs create init code <9> you can try c++ static initializers <9> and see the corresponding ***embler code <7> yea I'm not seeing anything <10> FASM eh? I've been looking for this all day :) <11> good morning to all <12> morning <13> http://www.smashthestack.org <14> yes, the reason i'm in here <15> I'm looking for a program that has some of the features debug.com(from DOS) had. 1. a way to ***emble code directly into memory. 2. a way to list all the registers so as your stepping thru the code you can check the values <14> still trying to figure out the question i actually have <16> johnzorn: #2 is easy, any modern debugger can do that, about #1, i'm not sure, but i *think* OllyDBG supported something like that <16> its not very easy in a modern OS though, since code is normally read-only <15> I shoulda specified linux <17> johnzorn, cool nick <15> heh <16> johnzorn: right, well, in that case, i dont know about #1, i'm not sure its even possible with the linux kernel, gdb can do #2 though <18> Aali: sure #1 is possible with linux <16> how? <18> Aali: ptrace can change the code of a running process <18> and gdb uses ptrace <16> right <18> i don't know if there is any friendly interface for it but you can write gdb macro <18> johnzorn: got some specific problem you are trying to solve? <15> I think I found it, this guy was an old dos debug.com user too and made a sort of clone for linux: http://www.modest-proposals.com/Furball.htm <18> i'd use gdb :) <15> lindi-, no I just found debug really good for playing around with ***embly and learning <18> also that web page is unreadable <18> hmm, only in elinks <18> "<h6 align="center">Screenshots, because you asked.</h4>" <18> talk about broken HTML <14> anyone have a good resource for a complete/commonly used listing of x86 ***embly instructions and ***embler directives, including a corresponding hex translation for each?
<18> thedude42: nasm includes one <18> thedude42: do you want human readable or machine readable? <14> i'd prefer some kind of table listing if possible, human readable <14> some kind of quick reference <14> pages and pages of quick reference i'm sure, cisc and all <14> but i haven't been able to find anything like that, at most a list of the most common instructions <14> but i don't think nasm is what i want <14> i think what i need is gas <14> or whatever ***embler expects the instructions to end in "l" and "b" <14> and if you know what the difference is there, that would be a huge help <18> thedude42: check nasmdoc.txt.gz ? <14> ok, yeah, pretty sure what i'm looking at is not nasm <14> primarily i'm going through the "smashing the stack for fun and profit" artickle from phrack a few years ago, and it looks like their output from GDB is not in nasm style ***embly <14> i might be barking up the wrong tree in trying to interperate the GDB output, but the examples used int he article for actually writing asembly code are definitely not following the nasm syntax that i see in nasm.txt <17> perhaps gdb uses output better parsable by as <16> thedude42: thats AT&T syntax <16> google it <16> i think you can make gdb spew intel syntax with some command line switch <14> ok, that gives me somewhere to look <14> i can't change the output myself, i need to know how to read what's in the article <14> wow, that brightened up my world <14> "Op-code dst src" in Intel syntax changes to <14> "Op-code src dst" in AT&T syntax. <14> was wondering why i felt myself going insane <14> it's always the simple things... thanks a ton <19> Anyone have a quick crash course on how to use GCC inline asm and AT&T syntax? I already know NASM ASM <20> yuriks, http://www.ibiblio.org/gferg/ldp/GCC-Inline-***embly-HOWTO.html <19> thanks <20> yuriks, please read it line by line. otherwise you might miss some important details <21> hello <21> I'd love to know something about timers <21> especially about the 8253 Timer chip, or its emulation <21> is it continuously triggering an interrupt 8 ? or do I first have to activate its triggering? <21> i did read a well writen site: http://www.cs.sun.ac.za/rw314/doc_8253.html <21> but I still don't get it yet... <21> any ideas? <18> hmm <18> keex: x86? realmode? <21> yes <18> keex: http://iki.fi/lindi/bios4.asm is something i recently wrote, maybe you could learn something from it <21> well, maybe not so very real, under win2000... ntvdm is used <18> sorry, wrong url <21> :D <18> http://iki.fi/lindi/debug4.asm <21> nice <21> before I read it "extensively" and try it out, I have a question: when entering a selfwritten isr, can I still access variables defined in data segment? like ds:WordVar or only from the code segment? <18> isr? <18> keex: no, ds can point to anywhere <18> keex: but if ds == cs this should be no problem <18> good question though <21> the thing is, that I copied http://home.in.tum.de/~kraft/studium/***embler/ton.asm and moved the variables to DATA (which first created) and replaced all cs:VAR with ds:VAR... the result was a crashing program <21> and I don't understand why.. <22> check what ds and cs are when the thing crashes, I bet they aren't the same <21> I know that the CS is pushed onto the stack before entering the isr, but is it still set? <21> they shouldn't be <22> if they aren't the same, why would you expect mov x,y and mov cs:x, y to work the same? <21> hmm... <21> lets say x and y are in DS, then I should be able to access them through ds:x and ds:y, shouldn't I? OR does the ds and cs registers change on their way to the isr? <22> ds isn't going to change, cs will <21> ok.. why? <22> because an interrupt is like a far call...it loads both cs and ip <18> and will keep ds intact <18> it might point anywhere <18> depending on what code was executing when the interrupt hit <19> void cpuid_execute(int *eax, int *ebx, int *ecx, int *edx) { __asm__ __volatile__ ("cpuid" : "=a"(*eax), "=b"(*ebx), "=c"(*ecx), "=d"(*edx) : "a"(*eax)); <19> } <19> wobster: does that look right to you? <19> or is *eax an invalid lvalue to use?
Return to
#asm or Go to some related
logs:
cxacru gui no audio in totem-xine ubuntu avi thunderbird associated helper application does not exist roll-up hover metacity P4S800 IRQ #perl iptables host/network eth0 not found ccd2iso dapper deb #ubuntu gentoo disk error 10,
|
|