
{"id":18580,"date":"2010-07-04T22:16:52","date_gmt":"2010-07-04T16:46:52","guid":{"rendered":"http:\/\/www.jeffrin.in\/?p=1843"},"modified":"2010-07-04T22:16:52","modified_gmt":"2010-07-04T16:46:52","slug":"inferiors-auxiliary-vector-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/07\/04\/inferiors-auxiliary-vector-2\/","title":{"rendered":"inferior&#039;s auxiliary vector&#8230;"},"content":{"rendered":"<pre>\n(gdb) info auxv\n33   AT_SYSINFO_EHDR      System-supplied DSO's ELF header 0x7fff7a9ff000\n16   AT_HWCAP             Machine-dependent CPU capability hints 0x78bfbff\n6    AT_PAGESZ            System page size               4096\n17   AT_CLKTCK            Frequency of times()           100\n3    AT_PHDR              Program headers for program    0x400040\n4    AT_PHENT             Size of program header entry   56\n5    AT_PHNUM             Number of program headers      8\n7    AT_BASE              Base address of interpreter    0x7f382489e000\n8    AT_FLAGS             Flags                          0x0\n9    AT_ENTRY             Entry point of program         0x4028e0\n11   AT_UID               Real user ID                   1000\n12   AT_EUID              Effective user ID              1000\n13   AT_GID               Real group ID                  1000\n14   AT_EGID              Effective group ID             1000\n23   AT_SECURE            Boolean, was exec setuid-like? 0\n25   AT_RANDOM            Address of 16 random bytes     0x7fff7a9b5839\n31   AT_EXECFN            File name of executable        0x7fff7a9b7fea \"\/usr\/bin\/htop\"\n15   AT_PLATFORM          String identifying platform    0x7fff7a9b5849 \"x86_64\"\n0    AT_NULL              End of vector                  0x0\n(gdb)\n<\/pre>\n<pre>\nDisplay the inferior's auxiliary vector.\nThat means acting as a subsidiary and kind of one dimensional array.\ntypedef struct\n{\n  long int a_type;              \/* Entry type *\/\n  union\n    {\n      long int a_val;           \/* Integer value *\/\n      void *a_ptr;              \/* Pointer value *\/\n      void (*a_fcn) (void);     \/* Function pointer value *\/\n    } a_un;\n} auxv_t;\n\n\n<\/pre>\n<pre>\n    48:    \/proc\/PID\/auxv, which is a common method for native targets.  *\/\n    49:\n    50: extern LONGEST procfs_xfer_auxv (struct target_ops *ops,\n\nsrc\/gdb\/auxv.c\n    30: #include \"auxv.h\"\n    31: #include \"elf\/common.h\"\n    37: \/* This function handles access via \/proc\/PID\/auxv, which is a common method\n    38:    for native targets.  *\/\n    50:   pathname = xstrprintf (\"\/proc\/%d\/auxv\", PIDGET (inferior_ptid));\n    51:   fd = open (pathname, writebuf != NULL ? O_WRONLY : O_RDONLY);\ngithub.com\/atgreen\/moxiedev.git - GPL - C\n\nMesa\/src\/mesa\/ppc\/common_ppc.c - 56 identical\n    60:    Elf64_auxv_t  v;\n    61: #else\n    62:    Elf32_auxv_t  v;\n    100:   sprintf( file_name, \"\/proc\/%u\/auxv\", (unsigned) my_pid );\n    66:   f = fopen( file_name, \"rb\" );\nwww.w3.org\/Amaya\/Distribution\/amaya-lib-src-9.54.tgz - Unknown - C\n\n\n<\/pre>\n<pre>\n$sudo hexdump  \/proc\/1045\/auxv\n0000000 0021 0000 0000 0000 f000 e87f 7fff 0000\n0000010 0010 0000 0000 0000 fbff 078b 0000 0000\n0000020 0006 0000 0000 0000 1000 0000 0000 0000\n0000030 0011 0000 0000 0000 0064 0000 0000 0000\n0000040 0003 0000 0000 0000 0040 0040 0000 0000\n0000050 0004 0000 0000 0000 0038 0000 0000 0000\n0000060 0005 0000 0000 0000 0008 0000 0000 0000\n0000070 0007 0000 0000 0000 2000 d5a6 7f94 0000\n0000080 0008 0000 0000 0000 0000 0000 0000 0000\n0000090 0009 0000 0000 0000 1c60 0040 0000 0000\n00000a0 000b 0000 0000 0000 0000 0000 0000 0000\n00000b0 000c 0000 0000 0000 0000 0000 0000 0000\n00000c0 000d 0000 0000 0000 0000 0000 0000 0000\n00000d0 000e 0000 0000 0000 0000 0000 0000 0000\n00000e0 0017 0000 0000 0000 0000 0000 0000 0000\n00000f0 0019 0000 0000 0000 b1d9 e87a 7fff 0000\n0000100 001f 0000 0000 0000 bfe8 e87a 7fff 0000\n0000110 000f 0000 0000 0000 b1e9 e87a 7fff 0000\n0000120 0000 0000 0000 0000 0000 0000 0000 0000\n0000130\n$\n<\/pre>\n<pre>\nThe auxiliary vector is intended for passing information from the\noperating system to a program interpreter, such as \/lib\/ld-lsb-ia64.so.1.\n\nsource :\n\nLinux Standard Base Specification for the Itanium\u2122 Architecture 1.3\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>(gdb) info auxv 33 AT_SYSINFO_EHDR System-supplied DSO&#8217;s ELF header 0x7fff7a9ff000 16 AT_HWCAP Machine-dependent CPU capability hints 0x78bfbff 6 AT_PAGESZ System page size 4096 17 AT_CLKTCK Frequency of times() 100 3 AT_PHDR Program headers for program 0x400040 4 AT_PHENT Size of program header entry 56 5 AT_PHNUM Number of program headers 8 7 AT_BASE Base address &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/07\/04\/inferiors-auxiliary-vector-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;inferior&#039;s auxiliary vector&#8230;&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18580"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18580"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18580\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}