> I am trying to build a system that needs to pick up the command line > arguments. However, it seems there are two ways to do it. No, there's only one. > The old way is that argc and argv elements are on the stack. And that's the correct way. > Using gcc 3.4.3, the argc is edi and the pointer for argv is in esi, > according to the times that I have tried it. > > Is this correct???? No. Maybe argc really is in edi and argv in esi, but it can change anytime. Without warning. You shouldn't ever depend on it. Also, I believe this behavior should be attributed to both glibc and gcc (and therefore can change when version of either changes). Marcin Kościelnicki --------------------------------------------------------------------- Toshiba i FIFA World Cup Wygraj bilety i notebooki z Intel Centrino Duo Mobile Technology http://link.interia.pl/f1912 - : send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- argc/argv
- From: glburt
- argc/argv
- Prev by Date: argc/argv
- Next by Date: hla
- Previous by thread: argc/argv
- Next by thread: hla
- Index(es):