/************ ********** * From /usr/include/sys/elf.h * sun2: 10.5.18.62 ************ **********/ /* * ELF header */ #define EI_NIDENT 16 typedef struct { unsigned char e_ident[EI_NIDENT]; /* ident bytes */ Elf32_Half e_type; /* file type */ Elf32_Half e_machine; /* target machine */ Elf32_Word e_version; /* file version */ Elf32_Addr e_entry; /* start address */ Elf32_Off e_phoff; /* phdr file offset */ Elf32_Off e_shoff; /* shdr file offset */ Elf32_Word e_flags; /* file flags */ Elf32_Half e_ehsize; /* sizeof ehdr */ Elf32_Half e_phentsize; /* sizeof phdr */ Elf32_Half e_phnum; /* number phdrs */ Elf32_Half e_shentsize; /* sizeof shdr */ Elf32_Half e_shnum; /* number shdrs */ Elf32_Half e_shstrndx; /* shdr string index */ } Elf32_Ehdr; /* * Section header */ typedef struct { Elf32_Word sh_name; /* section name */ Elf32_Word sh_type; /* SHT_... */ Elf32_Word sh_flags; /* SHF_... */ Elf32_Addr sh_addr; /* virtual address */ Elf32_Off sh_offset; /* file offset */ Elf32_Word sh_size; /* section size */ Elf32_Word sh_link; /* misc info */ Elf32_Word sh_info; /* misc info */ Elf32_Word sh_addralign; /* memory alignment */ Elf32_Word sh_entsize; /* entry size if table */ } Elf32_Shdr; /* * Symbol table */ typedef struct { Elf32_Word st_name; Elf32_Addr st_value; Elf32_Word st_size; unsigned char st_info; /* bind, type: ELF_32_ST_... */ unsigned char st_other; Elf32_Half st_shndx; /* SHN_... */ } Elf32_Sym; /* * Relocation */ typedef struct { Elf32_Addr r_offset; Elf32_Word r_info; /* sym, type: ELF32_R_... */ Elf32_Sword r_addend; } Elf32_Rela; /****************** Byte dump of merge.o ****************/ ELF Header 0: 0x7F 0x45 0x4C 0x46 Magic number ELF 4: 0x1 32-bit object (4 GB VM) 5: 0x2 Big endian data encoding, LSB in higher address 6: 0x1 File version - current 7: 0x0 ... 0x0 Unused 16: 0x0 0x1 Relocatable file 18: 0x0 0x2 Machine: SPARC 20: 0x0 0x0 0x0 0x1 Version: Current 24: 0x0 0x0 0x0 0x0 Entry-point VA - not for relocatable file 28: 0x0 0x0 0x0 0x0 File offset of the program-header table, not for relocatable file 32: 0x0 0x0 0x8 0x4C File offset (2124 B) of Section-header table. 36: 0x0 0x0 0x0 0x0 No processor specific flag 40: 0x0 0x34 ELF Header size: 52 bytes 42: 0x0 0x0 Size of Program-header table entry (NA) 44: 0x0 0x0 Number of entries in program-header table (NA) 46: 0x0 0x28 Size of section-header table entry: 40 bytes 48: 0x0 0x9 Number of entries in the section-header table 50: 0x0 0x1 Section-header table index for the section name string table Section: Section name string table (.shstrtab) 52: 0x0 53: 0x2E 0x73 0x68 0x73 0x74 0x72 0x74 0x61 0x62 0x0 : ".shstrtab" 63: 0x2E 0x74 0x65 0x78 0x74 0x0 : ".text" 69: 0x2E 0x64 0x61 0x74 0x61 0x0 : ".data" 75: 0x2E 0x72 0x6F 0x64 0x61 0x74 0x61 0x0 : ".rodata" 83: 0x2E 0x73 0x79 0x6D 0x74 0x61 0x62 0x0 : ".symtab" 91: 0x2E 0x73 0x74 0x72 0x74 0x61 0x62 0x0 : ".strtab" 99: 0x2E 0x72 0x65 0x6C 0x61 0x2E 0x74 0x65 0x78 0x74 0x0 : ".rela.text" 110: 0x2E 0x63 0x6F 0x6D 0x6D 0x65 0x6E 0x74 0x0 : ".comment" .shstrtab Ends 119: 0x0 Section: Text or executable code (.text) Function main: 120: 0x9D 121: 0xE3 122: 0xBD 123: 0xF8 124: 0x13 125: 0x0 126: 0x0 127: 0x0 128: 0x90 129: 0x12 130: 0x60 131: 0x0 132: 0x40 133: 0x0 134: 0x0 135: 0x0 136: 0x1 137: 0x0 138: 0x0 139: 0x0 140: 0x92 141: 0x7 142: 0xBF 143: 0xEC 144: 0x15 145: 0x0 146: 0x0 147: 0x0 148: 0x90 149: 0x12 150: 0xA0 151: 0x0 152: 0x40 153: 0x0 154: 0x0 155: 0x0 156: 0x1 157: 0x0 158: 0x0 159: 0x0 160: 0x13 161: 0x0 162: 0x0 163: 0x0 164: 0x90 165: 0x12 166: 0x60 167: 0x0 168: 0xD2 169: 0x7 170: 0xBF 171: 0xEC 172: 0x40 173: 0x0 174: 0x0 175: 0x0 176: 0x1 177: 0x0 178: 0x0 179: 0x0 180: 0xC0 181: 0x27 182: 0xBF 183: 0xE8 184: 0xD0 185: 0x7 186: 0xBF 187: 0xE8 188: 0xD2 189: 0x7 190: 0xBF 191: 0xEC 192: 0x80 193: 0xA2 194: 0x0 195: 0x9 196: 0x6 197: 0x80 198: 0x0 199: 0x4 200: 0x1 201: 0x0 202: 0x0 203: 0x0 204: 0x10 205: 0x80 206: 0x0 207: 0x10 208: 0x1 209: 0x0 210: 0x0 211: 0x0 212: 0x90 213: 0x7 214: 0xBE 215: 0x58 216: 0xD2 217: 0x7 218: 0xBF 219: 0xE8 220: 0x94 221: 0x10 222: 0x0 223: 0x9 224: 0x97 225: 0x2A 226: 0xA0 227: 0x2 228: 0x92 229: 0x2 230: 0x0 231: 0xB 232: 0x15 233: 0x0 234: 0x0 235: 0x0 236: 0x90 237: 0x12 238: 0xA0 239: 0x0 240: 0x40 241: 0x0 242: 0x0 243: 0x0 244: 0x1 245: 0x0 246: 0x0 247: 0x0 248: 0xD0 249: 0x7 250: 0xBF 251: 0xE8 252: 0x92 253: 0x2 254: 0x20 255: 0x1 256: 0xD2 257: 0x27 258: 0xBF 259: 0xE8 260: 0x10 261: 0xBF 262: 0xFF 263: 0xED 264: 0x1 265: 0x0 266: 0x0 267: 0x0 268: 0x92 269: 0x7 270: 0xBE 271: 0x58 272: 0x90 273: 0x10 274: 0x0 275: 0x9 276: 0xD2 277: 0x7 278: 0xBF 279: 0xEC 280: 0x40 281: 0x0 282: 0x0 283: 0x0 284: 0x1 285: 0x0 286: 0x0 287: 0x0 288: 0xC0 289: 0x27 290: 0xBF 291: 0xE8 292: 0xD2 293: 0x7 294: 0xBF 295: 0xEC 296: 0x90 297: 0x2 298: 0x60 299: 0x9 300: 0xD2 301: 0x7 302: 0xBF 303: 0xE8 304: 0x80 305: 0xA2 306: 0x40 307: 0x8 308: 0x6 309: 0x80 310: 0x0 311: 0x4 312: 0x1 313: 0x0 314: 0x0 315: 0x0 316: 0x10 317: 0x80 318: 0x0 319: 0x11 320: 0x1 321: 0x0 322: 0x0 323: 0x0 324: 0x11 325: 0x0 326: 0x0 327: 0x0 328: 0x92 329: 0x12 330: 0x20 331: 0x0 332: 0xD0 333: 0x7 334: 0xBF 335: 0xE8 336: 0x96 337: 0x10 338: 0x0 339: 0x8 340: 0x95 341: 0x2A 342: 0xE0 343: 0x2 344: 0x17 345: 0x0 346: 0x0 347: 0x0 348: 0x90 349: 0x12 350: 0xE0 351: 0x0 352: 0xD2 353: 0x2 354: 0x40 355: 0xA 356: 0x40 357: 0x0 358: 0x0 359: 0x0 360: 0x1 361: 0x0 362: 0x0 363: 0x0 364: 0xD0 365: 0x7 366: 0xBF 367: 0xE8 368: 0x92 369: 0x2 370: 0x20 371: 0x1 372: 0xD2 373: 0x27 374: 0xBF 375: 0xE8 376: 0x10 377: 0xBF 378: 0xFF 379: 0xEB 380: 0x1 381: 0x0 382: 0x0 383: 0x0 384: 0x13 385: 0x0 386: 0x0 387: 0x0 388: 0x90 389: 0x12 390: 0x60 391: 0x0 392: 0x40 393: 0x0 394: 0x0 395: 0x0 396: 0x1 397: 0x0 398: 0x0 399: 0x0 400: 0xB0 401: 0x10 402: 0x20 403: 0x0 404: 0x10 405: 0x80 406: 0x0 407: 0x2 408: 0x1 409: 0x0 410: 0x0 411: 0x0 412: 0x81 413: 0xC7 414: 0xE0 415: 0x8 416: 0x81 417: 0xE8 418: 0x0 419: 0x0 Function merge: 420: 0x9D 421: 0xE3 422: 0xBF 423: 0x80 424: 0xF0 425: 0x27 426: 0xA0 427: 0x44 428: 0xF2 429: 0x27 430: 0xA0 431: 0x48 432: 0xC0 433: 0x27 434: 0xBF 435: 0xEC 436: 0xD0 437: 0x7 438: 0xA0 439: 0x48 440: 0x92 441: 0x2 442: 0x20 443: 0x8 444: 0xD2 445: 0x27 446: 0xBF 447: 0xE8 448: 0xD0 449: 0x7 450: 0xBF 451: 0xEC 452: 0xD2 453: 0x7 454: 0xA0 455: 0x48 456: 0x80 457: 0xA2 458: 0x0 459: 0x9 460: 0x6 461: 0x80 462: 0x0 463: 0x4 464: 0x1 465: 0x0 466: 0x0 467: 0x0 468: 0x10 469: 0x80 470: 0x0 471: 0x16 472: 0x1 473: 0x0 474: 0x0 475: 0x0 476: 0x13 477: 0x0 478: 0x0 479: 0x0 480: 0x90 481: 0x12 482: 0x60 483: 0x0 484: 0xD2 485: 0x7 486: 0xBF 487: 0xE8 488: 0x94 489: 0x10 490: 0x0 491: 0x9 492: 0x93 493: 0x2A 494: 0xA0 495: 0x2 496: 0xD4 497: 0x7 498: 0xBF 499: 0xEC 500: 0x96 501: 0x10 502: 0x0 503: 0xA 504: 0x95 505: 0x2A 506: 0xE0 507: 0x2 508: 0xD6 509: 0x7 510: 0xA0 511: 0x44 512: 0x94 513: 0x2 514: 0x80 515: 0xB 516: 0xD6 517: 0x2 518: 0x80 519: 0x0 520: 0xD6 521: 0x22 522: 0x0 523: 0x9 524: 0xD0 525: 0x7 526: 0xBF 527: 0xEC 528: 0x92 529: 0x2 530: 0x20 531: 0x1 532: 0xD2 533: 0x27 534: 0xBF 535: 0xEC 536: 0xD0 537: 0x7 538: 0xBF 539: 0xE8 540: 0x92 541: 0x2 542: 0x3F 543: 0xFF 544: 0xD2 545: 0x27 546: 0xBF 547: 0xE8 548: 0x10 549: 0xBF 550: 0xFF 551: 0xE7 552: 0x1 553: 0x0 554: 0x0 555: 0x0 556: 0x1 557: 0x0 558: 0x0 559: 0x0 560: 0xC0 561: 0x27 562: 0xBF 563: 0xE4 564: 0xC0 565: 0x27 566: 0xBF 567: 0xEC 568: 0xD0 569: 0x7 570: 0xA0 571: 0x48 572: 0x92 573: 0x2 574: 0x20 575: 0x8 576: 0xD2 577: 0x27 578: 0xBF 579: 0xE8 580: 0xD2 581: 0x7 582: 0xA0 583: 0x48 584: 0x90 585: 0x2 586: 0x60 587: 0x9 588: 0xD2 589: 0x7 590: 0xBF 591: 0xE4 592: 0x80 593: 0xA2 594: 0x40 595: 0x8 596: 0x6 597: 0x80 598: 0x0 599: 0x4 600: 0x1 601: 0x0 602: 0x0 603: 0x0 604: 0x10 605: 0x80 606: 0x0 607: 0x36 608: 0x1 609: 0x0 610: 0x0 611: 0x0 612: 0x13 613: 0x0 614: 0x0 615: 0x0 616: 0x90 617: 0x12 618: 0x60 619: 0x0 620: 0xD2 621: 0x7 622: 0xBF 623: 0xEC 624: 0x94 625: 0x10 626: 0x0 627: 0x9 628: 0x93 629: 0x2A 630: 0xA0 631: 0x2 632: 0x17 633: 0x0 634: 0x0 635: 0x0 636: 0x94 637: 0x12 638: 0xE0 639: 0x0 640: 0xD6 641: 0x7 642: 0xBF 643: 0xE8 644: 0x98 645: 0x10 646: 0x0 647: 0xB 648: 0x97 649: 0x2B 650: 0x20 651: 0x2 652: 0xD0 653: 0x2 654: 0x0 655: 0x9 656: 0xD2 657: 0x2 658: 0x80 659: 0xB 660: 0x80 661: 0xA2 662: 0x0 663: 0x9 664: 0x16 665: 0x80 666: 0x0 667: 0x13 668: 0x1 669: 0x0 670: 0x0 671: 0x0 672: 0x13 673: 0x0 674: 0x0 675: 0x0 676: 0x90 677: 0x12 678: 0x60 679: 0x0 680: 0xD2 681: 0x7 682: 0xBF 683: 0xE4 684: 0x94 685: 0x10 686: 0x0 687: 0x9 688: 0x93 689: 0x2A 690: 0xA0 691: 0x2 692: 0x15 693: 0x0 694: 0x0 695: 0x0 696: 0x98 697: 0x12 698: 0xA0 699: 0x0 700: 0x94 701: 0x7 702: 0xBF 703: 0xEC 704: 0xD6 705: 0x2 706: 0x80 707: 0x0 708: 0x9A 709: 0x10 710: 0x0 711: 0xB 712: 0x85 713: 0x2B 714: 0x60 715: 0x2 716: 0xD8 717: 0x3 718: 0x0 719: 0x2 720: 0xD8 721: 0x22 722: 0x0 723: 0x9 724: 0x96 725: 0x2 726: 0xE0 727: 0x1 728: 0xD6 729: 0x22 730: 0x80 731: 0x0 732: 0x10 733: 0x80 734: 0x0 735: 0x11 736: 0x1 737: 0x0 738: 0x0 739: 0x0 740: 0x13 741: 0x0 742: 0x0 743: 0x0 744: 0x90 745: 0x12 746: 0x60 747: 0x0 748: 0xD2 749: 0x7 750: 0xBF 751: 0xE4 752: 0x94 753: 0x10 754: 0x0 755: 0x9 756: 0x93 757: 0x2A 758: 0xA0 759: 0x2 760: 0x15 761: 0x0 762: 0x0 763: 0x0 764: 0x98 765: 0x12 766: 0xA0 767: 0x0 768: 0x94 769: 0x7 770: 0xBF 771: 0xE8 772: 0xD6 773: 0x2 774: 0x80 775: 0x0 776: 0x9A 777: 0x10 778: 0x0 779: 0xB 780: 0x85 781: 0x2B 782: 0x60 783: 0x2 784: 0xD8 785: 0x3 786: 0x0 787: 0x2 788: 0xD8 789: 0x22 790: 0x0 791: 0x9 792: 0x96 793: 0x2 794: 0xFF 795: 0xFF 796: 0xD6 797: 0x22 798: 0x80 799: 0x0 800: 0xD0 801: 0x7 802: 0xBF 803: 0xE4 804: 0x92 805: 0x2 806: 0x20 807: 0x1 808: 0xD2 809: 0x27 810: 0xBF 811: 0xE4 812: 0x10 813: 0xBF 814: 0xFF 815: 0xC6 816: 0x1 817: 0x0 818: 0x0 819: 0x0 820: 0x81 821: 0xC7 822: 0xE0 823: 0x8 824: 0x81 825: 0xE8 826: 0x0 827: 0x0 .text Ends Section: Writable global data (.data) 828: 0x0 0x0 0x0 0xA 10 (D) 832: 0x0 0x0 0x0 0x14 20 (D) 836: 0x0 0x0 0x0 0x1E 30 (D) 840: 0x0 0x0 0x0 0x28 40 (D) 844: 0x0 0x0 0x0 0x32 50 (D) 848: 0x0 0x0 0x0 0x3C 60 (D) 852: 0x0 0x0 0x0 0x46 70 (D) 856: 0x0 0x0 0x0 0x50 80 (D) 860: 0x0 0x0 0x0 0x5A 90 (D) 864: 0x0 ................ all zeros 1227: 0x0 .data section Ends 1228: 0x0 1229: 0x0 1230: 0x0 1231: 0x0 Section: Read-only data (.rodata) 1232: 0x45 0x6E 0x74 0x65 0x72 0x20 0x61 0x20 0x70 0x6F 0x73 0x69 0x74 0x69 0x76 0x65 0x20 0x69 0x6E 0x74 0x65 0x67 0x65 0x72 0x3A 0x0 : "Enter a positive integer:" 1258: 0x0 0x0 0x0 0x0 0x0 0x0 - aligned to 8-byte boundary 1264: 0x25 0x64 0x0 : "%d" 1267: 0x0 0x0 0x0 0x0 0x0 - aligned to 8-byte boundary 1272: 0xA 0x45 0x6E 0x74 0x65 0x72 0x20 0x25 0x64 0x20 0x69 0x6E 0x74 0x65 0x67 0x65 0x72 0x20 0x64 0x61 0x74 0x61 0x20 0x69 0x6E 0x20 0x61 0x73 0x63 0x65 0x6E 0x64 0x69 0x6E 0x67 0x20 0x6F 0x72 0x64 0x65 0x72 0x3A 0xA 0x0 : "\nEnter %d integer data in ascending order:\n" 1316: 0x0 0x0 0x0 0x0 - aligned to 8-byte boundary 1320: 0x25 0x64 0x20 0x0 : "%d " 1324: 0x0 0x0 0x0 0x0 - aligned to 8-byte boundary 1328: 0xA 0x0 : "\n" .rodata Ends 1330: 0x0 1331: 0x0 Section: Symbol table (.symtab) SymTabEntry-0 Null Entry 1332: 0x0 1333: 0x0 1334: 0x0 1335: 0x0 1336: 0x0 1337: 0x0 1338: 0x0 1339: 0x0 1340: 0x0 1341: 0x0 1342: 0x0 1343: 0x0 1344: 0x0 1345: 0x0 1346: 0x0 1347: 0x0 SymTabEntry-1 for the symbol "merge.c" 1348: 0x0 0x0 0x0 0x1 Name: offset in the .strtab: 1 bytes 1352: 0x0 0x0 0x0 0x0 Address: 0 bytes (??) 1356: 0x0 0x0 0x0 0x0 Size: 0 bytes (??) 1360: 0x4 Info: 0 + 3: Local symbol, name of the source file 1361: 0x0 Unused 1362: 0xFF 0xF1 Section: 0xFFF1: absolute value of the symbol, no change due to relocation SymTabEntry-2 1364: 0x0 0x0 0x0 0x0 Name: offset in the .strtab: 0 bytes 1368: 0x0 0x0 0x0 0x0 Address: 0 bytes (??) 1372: 0x0 0x0 0x0 0x0 Size: 0 bytes (??) 1376: 0x3 Info: 0 + 3: Local symbol for relocation 1377: 0x0 Unused 1378: 0x0 0x3 Section: section header table index 2: .data SymTabEntry-3 for the symbol "gcc2_compiled." 1380: 0x0 0x0 0x0 0x9 Name: offset in the .strtab: 9 bytes 1384: 0x0 0x0 0x0 0x0 Address: 0 bytes (??) 1388: 0x0 0x0 0x0 0x0 Size: 0 bytes (??) 1392: 0x0 Info: 0 + 0: Local + Notype 1393: 0x0 Unused 1394: 0x0 0x2 Section: section header table index 2: .text SymTabEntry-4 1396: 0x0 0x0 0x0 0x0 Name: offset in the .strtab: 0 bytes 1400: 0x0 0x0 0x0 0x0 Address: 0 bytes (??) 1404: 0x0 0x0 0x0 0x0 Size: 0 bytes (??) 1408: 0x3 Info: 0 + 3: Local symbol for relocation 1409: 0x0 Unused 1410: 0x0 0x2 Section: section header table index 2: .text SymTabEntry-5 1412: 0x0 0x0 0x0 0x0 Name: offset in the .strtab: 0 bytes 1416: 0x0 0x0 0x0 0x0 Address: 0 bytes (??) 1420: 0x0 0x0 0x0 0x0 Size: 0 bytes (??) 1424: 0x3 Info: 0 + 3: Local symbol for relocation 1425: 0x0 Unused 1426: 0x0 0x4 Section: section header table index 4: .rodata SymTabEntry-6 for the symbol "mergedData" 1428: 0x0 0x0 0x0 0x18 Offset in the .strtab: 24 bytes 1432: 0x0 0x0 0x0 0x4 Address: 4 byte (??) 1436: 0x0 0x0 0x1 0x90 Size: 400 bytes 1440: 0x11 Info: 16 + 1=17: Global + Object (data) 1441: 0x0 Unused 1442: 0xFF 0xF2 Section: 0xFFF2: .common section SymTabEntry-7 for the symbol "scanf" 1444: 0x0 0x0 0x0 0x23 Name: offset in .strtab: 35 bytes 1448: 0x0 0x0 0x0 0x0 Address: 0 1452: 0x0 0x0 0x0 0x0 Size: 0 1456: 0x10 Info: 16 + 0: Global + Notype 1457: 0x0 Unused 1458: 0x0 0x0 Section: 0x0: section undefined SymTabEntry-8 for the symbol "printf" 1460: 0x0 0x0 0x0 0x29 Name: offset in .strtab: 41 bytes 1464: 0x0 0x0 0x0 0x0 Address: 0 1468: 0x0 0x0 0x0 0x0 Size: 0 1472: 0x10 Info: 16 + 0: Global + Notype 1473: 0x0 Unused 1474: 0x0 0x0 Section: no section name SymTabEntry-9 for the symbol "main" 1476: 0x0 0x0 0x0 0x30 Name: offset in .strtab: 48 bytes 1480: 0x0 0x0 0x0 0x0 Address: offset in .text: 0 bytes 1484: 0x0 0x0 0x1 0x2C Size: 300 bytes 1488: 0x12 Info: 16 + 2 = 18: Global + Function 1489: 0x0 Unused 1490: 0x0 0x2 Section: section header indexi 2: .text SymTabEntry-10 for the symbol "data1" 1492: 0x0 0x0 0x0 0x35 Name: offset in .strtab: 53 bytes 1496: 0x0 0x0 0x0 0x0 Address: offset in .data: 0 bytes 1500: 0x0 0x0 0x1 0x90 Size: 400 bytes 1504: 0x11 Info: 16 + 1 = 17: Global + Object (data) 1505: 0x0 Unused 1506: 0x0 0x3 Section: section header index 3: .data SymTabEntry-11 for the symbol "merge" 1508: 0x0 0x0 0x0 0x3B Name: offset in .strtab: 59 bytes 1512: 0x0 0x0 0x1 0x2C Address: offset in the section (.text): 300 bytes 1516: 0x0 0x0 0x1 0x98 Size: 408 byte 1520: 0x12 Info: 16 + 2 = 18: Global + Function 1521: 0x0 Not Used 1522: 0x0 0x2 Section: section header indexi 2: .text .symtab Ends Section: String table (.strtab) for the symbol table (.symtab) 1524: 0x0 1525: 0x6D 0x65 0x72 0x67 0x65 0x2E 0x63 0x0 : "merge.c" 1533: 0x67 0x63 0x63 0x32 0x5F 0x63 0x6F 0x6D 0x70 0x69 0x6C 0x65 0x64 0x2E 0x0 : "gcc2_compiled." 1548: 0x6D 0x65 0x72 0x67 0x65 0x64 0x44 0x61 0x74 0x61 0x0 : "mergedData" 1559: 0x73 0x63 0x61 0x6E 0x66 0x0 : "scanf" 1565: 0x70 0x72 0x69 0x6E 0x74 0x66 0x0 : "printf" 1572: 0x6D 0x61 0x69 0x6E 0x0 : "main" 1577: 0x64 0x61 0x74 0x61 0x31 0x0 : "data1" 1583: 0x6D 0x65 0x72 0x67 0x65 0x0 : "merge" .strtab Ends 1589: 0x0 1590: 0x0 1591: 0x0 Section: Relocation table (.rela.text) for .text and .symtab Relocation Table: 0 1592: 0x0 0x0 0x0 0x4 Offset: 4 bytes: .text sethi %hi(.LLC0), %o1 0x13 0x0 0x0 0x0 1596: 0x0 0x0 0x5 0x9 Info: 5 + 9: 5th entry of .symtab + Hi 22-bits 1600: 0x0 0x0 0x0 0x0 Addend: 0 Relocation Table: 1 1604: 0x0 0x0 0x0 0x8 Offset: 8 bytes: .text or %o1, %lo(.LLC0), %o0 0x90 0x12 0x60 0x0 1608: 0x0 0x0 0x5 0xC Info: 5 + C: 5th entry of .symtab + Lo 10-bits 1612: 0x0 0x0 0x0 0x0 Addend: 0 Relocation Table: 2 1616: 0x0 0x0 0x0 0xC Offset: 12 bytes: .text call printf, 0 0x40 0x0 0x0 0x0 1620: 0x0 0x0 0x8 0x7 Info: 8 + 7: 8th entry of .symtab + Displacement 30-bits 1624: 0x0 0x0 0x0 0x0 Addend: 0 Relocation Table: 3 1628: 0x0 0x0 0x0 0x18 Offset: 24 bytes sethi %hi(.LLC1), %o2 0x15 0x0 0x0 0x0 1632: 0x0 0x0 0x5 0x9 Info: 5 + 9 1636: 0x0 0x0 0x0 0x20 Addend: 32 byte (.LLC1 starts at byte offset 32 of .rodata) Relocation Table: 4 1640: 0x0 0x0 0x0 0x1C 1644: 0x0 0x0 0x5 0xC 1648: 0x0 0x0 0x0 0x20 Relocation Table: 5 1652: 0x0 0x0 0x0 0x20 Offset: 32 bytes call scanf, 0 0x40 0x0 0x0 0x0 1656: 0x0 0x0 0x7 0x7 Info: 7 + 7: 7th entry of .symtab + 30-bit Displacement 1660: 0x0 0x0 0x0 0x0 Addend: 0 Relocation Table: 5 1664: 0x0 0x0 0x0 0x28 Offset: 40 bytes sethi %hi(.LLC2), %o1 1668: 0x0 0x0 0x5 0x9 Info: 5 + 9: 5th entry .symtab (.rodata) + Hi 22-bits 1672: 0x0 0x0 0x0 0x28 Addend: 40 bytes: .LLC2 starts at offset 40 in .rodata Relocation Table: 6 1676: 0x0 0x0 0x0 0x2C Offset: 44 bytes or %o1, %lo(.LLC2), %o0 1680: 0x0 0x0 0x5 0xC 1684: 0x0 0x0 0x0 0x28 Relocation Table: 7 1688: 0x0 0x0 0x0 0x34 Offset: 52 bytes 1692: 0x0 0x0 0x8 0x7 call printf, 0 1696: 0x0 0x0 0x0 0x0 Relocation Table: 8 1700: 0x0 0x0 0x0 0x70 Offset: 112 bytes 1704: 0x0 0x0 0x5 0x9 sethi %hi(.LLC1), %o2 1708: 0x0 0x0 0x0 0x20 Relocation Table: 9 1712: 0x0 0x0 0x0 0x74 Offset: 116 bytes 1716: 0x0 0x0 0x5 0xC or %o2, %lo(.LLC1), %o0 1720: 0x0 0x0 0x0 0x20 1724: 0x0 0x0 0x0 0x78 Offset: 120 bytes 1728: 0x0 0x0 0x7 0x7 call scanf, 0 1732: 0x0 0x0 0x0 0x0 Relocation Table: 10 1736: 0x0 0x0 0x0 0xA0 Offset: 160 bytes call merge, 0 1740: 0x0 0x0 0xB 0x7 Info: 11 + 7: .symtab index 11 (merge) + 30-bit displacement 1744: 0x0 0x0 0x0 0x0 Relocation Table: 11 1748: 0x0 0x0 0x0 0xCC Offset: 204 bytes sethi %hi(mergedData), %o0 1752: 0x0 0x0 0x6 0x9 Info: 6 + 9: .symtab index 6 (mergedData) + Hi 22-bits 1756: 0x0 0x0 0x0 0x0 Relocation Table: 12 1760: 0x0 0x0 0x0 0xD0 1764: 0x0 0x0 0x6 0xC 1768: 0x0 0x0 0x0 0x0 Relocation Table: 13 1772: 0x0 0x0 0x0 0xE0 sethi %hi(.LLC3), %o3 1776: 0x0 0x0 0x5 0x9 Info: 5 + 9: 1780: 0x0 0x0 0x0 0x58 Addend: 88 bytes - .LLC3 in .rodata Relocation Table: 14 1784: 0x0 0x0 0x0 0xE4 1788: 0x0 0x0 0x5 0xC 1792: 0x0 0x0 0x0 0x58 Relocation Table: 14 1796: 0x0 0x0 0x0 0xEC 1800: 0x0 0x0 0x8 0x7 1804: 0x0 0x0 0x0 0x0 Relocation Table: 15 1808: 0x0 0x0 0x1 0x8 1812: 0x0 0x0 0x5 0x9 1816: 0x0 0x0 0x0 0x60 Relocation Table: 16 1820: 0x0 0x0 0x1 0xC 1824: 0x0 0x0 0x5 0xC 1828: 0x0 0x0 0x0 0x60 Relocation Table: 17 1832: 0x0 0x0 0x1 0x10 1836: 0x0 0x0 0x8 0x7 1840: 0x0 0x0 0x0 0x0 Relocation Table: 18 1844: 0x0 0x0 0x1 0x64 1848: 0x0 0x0 0xA 0x9 1852: 0x0 0x0 0x0 0x0 Relocation Table: 19 1856: 0x0 0x0 0x1 0x68 1860: 0x0 0x0 0xA 0xC 1864: 0x0 0x0 0x0 0x0 Relocation Table: 20 1868: 0x0 0x0 0x1 0xEC 1872: 0x0 0x0 0xA 0x9 1876: 0x0 0x0 0x0 0x0 Relocation Table: 21 1880: 0x0 0x0 0x1 0xF0 1884: 0x0 0x0 0xA 0xC 1888: 0x0 0x0 0x0 0x0 Relocation Table: 22 1892: 0x0 0x0 0x2 0x0 1896: 0x0 0x0 0xA 0x9 1900: 0x0 0x0 0x0 0x0 Relocation Table: 23 1904: 0x0 0x0 0x2 0x4 1908: 0x0 0x0 0xA 0xC 1912: 0x0 0x0 0x0 0x0 Relocation Table: 24 1916: 0x0 0x0 0x2 0x28 1920: 0x0 0x0 0x6 0x9 1924: 0x0 0x0 0x0 0x0 Relocation Table: 25 1928: 0x0 0x0 0x2 0x2C 1932: 0x0 0x0 0x6 0xC 1936: 0x0 0x0 0x0 0x0 Relocation Table: 26 1940: 0x0 0x0 0x2 0x3C 1944: 0x0 0x0 0xA 0x9 Info: 10 + 9: index 10 of .symtab (data1) 1948: 0x0 0x0 0x0 0x0 Relocation Table: 27 1952: 0x0 0x0 0x2 0x40 1956: 0x0 0x0 0xA 0xC Info: 10 + 12: index 10 of .symtab (data1) 1960: 0x0 0x0 0x0 0x0 Relocation Table: 28 1964: 0x0 0x0 0x2 0x6C 1968: 0x0 0x0 0x6 0x9 1972: 0x0 0x0 0x0 0x0 Relocation Table: 29 1976: 0x0 0x0 0x2 0x70 1980: 0x0 0x0 0x6 0xC Info: 6 + 12: index 6 of .symtab (mergedData) + Lo 10-bits 1984: 0x0 0x0 0x0 0x0 Relocation Table: 30 1988: 0x0 0x0 0x2 0x80 Offset: 640 bytes sethi %hi(data1), %o2 1992: 0x0 0x0 0xA 0x9 Info: 10 + 9: index 10 of .symtab (data1) + Hi 22-bits 1996: 0x0 0x0 0x0 0x0 Relocation Table: 31 2000: 0x0 0x0 0x2 0x84 Offset: 644 bytes or %o2, %lo(data1), %o4 2004: 0x0 0x0 0xA 0xC Info: 10 + 12: index 10 of .symtab (data1) + Lo 10-bits 2008: 0x0 0x0 0x0 0x0 .rela.text Ends Section: .comment 2012: 0x0 2013: 0x61 "as: Sun WorkShop 6 update 2 Compiler Common 6.2 Solaris_9_CBE 2001/04/02 GCC: (GNU) 2.95.3 20010315 (release)" 2122: 0x29 2123: 0x0 .comment Ends Section-header table: Entry: 0 Null Entry 2124: 0x0 .................... 2163: 0x0 Entry: 1 Section name string table (.shstrtab) 2164: 0x0 0x0 0x0 0x1 Section name: offset within the string table - 01 2168: 0x0 0x0 0x0 0x3 Section type: string table 2172: 0x0 0x0 0x0 0x0 Flags: no flag 2176: 0x0 0x0 0x0 0x0 Address: if the section is a memory image 2180: 0x0 0x0 0x0 0x34 Offset of the section in the file: 52 bytes 2184: 0x0 0x0 0x0 0x43 Size of the section: 67 bytes (52 - 118) 2188: 0x0 0x0 0x0 0x0 Link: 2192: 0x0 0x0 0x0 0x0 Info: 2196: 0x0 0x0 0x0 0x1 Alignment: no alignment constraints 2200: 0x0 0x0 0x0 0x0 Entry size: table entry size (NA) Entry: 2 Code section (.text) 2204: 0x0 0x0 0x0 0xB Offset within the string table: 11 2208: 0x0 0x0 0x0 0x1 Program bits (code in this case) 2212: 0x0 0x0 0x0 0x6 Flags: 6 = 2 + 4: section occupies memory during execution, contains code (read-only) 2216: 0x0 0x0 0x0 0x0 Address (NA) 2220: 0x0 0x0 0x0 0x78 Section offset in the file: 120 bytes 2224: 0x0 0x0 0x2 0xC4 Section size: 708 bytes (120 - 827) 2228: 0x0 0x0 0x0 0x0 Link (NA) 2232: 0x0 0x0 0x0 0x0 Info (NA) 2236: 0x0 0x0 0x0 0x4 Address alignment: 4-byte boundary 2240: 0x0 0x0 0x0 0x0 Entry size (NA) Entry: 3 Global data section (.data) 2244: 0x0 0x0 0x0 0x11 Offset within the string table (.shstrtab) 17 2248: 0x0 0x0 0x0 0x1 Program bits (initialize data) 2252: 0x0 0x0 0x0 0x3 Flags: 1 + 2 = 3 :writable data, there will be memory allocation 2256: 0x0 0x0 0x0 0x0 Address: (NA) 2260: 0x0 0x0 0x3 0x3C Section offset in the file: 828 bytes 2264: 0x0 0x0 0x1 0x90 Section size: 400 bytes (828 - 1227) 2268: 0x0 0x0 0x0 0x0 Link: (NA) 2272: 0x0 0x0 0x0 0x0 Info: (NA) 2276: 0x0 0x0 0x0 0x4 Address allignment: 4-byte boundary 2280: 0x0 0x0 0x0 0x0 Entry size: (NA) Entry: 4 Read-only data section (.rodata) 2284: 0x0 0x0 0x0 0x17 Offset within the string table: 23 2288: 0x0 0x0 0x0 0x1 Program bits 2292: 0x0 0x0 0x0 0x2 Flags: 2 : memory allocation, read-only 2296: 0x0 0x0 0x0 0x0 Address: (NA) 2300: 0x0 0x0 0x4 0xD0 Offset in the file: 1232 bytes 2304: 0x0 0x0 0x0 0x62 Size of the section: 98 bytes (1232 - 1329) 2308: 0x0 0x0 0x0 0x0 Link: (NA) 2312: 0x0 0x0 0x0 0x0 Info: (NA) 2316: 0x0 0x0 0x0 0x8 Address alignment: 8 byte boundary 2320: 0x0 0x0 0x0 0x0 Entry size Entry: 5 Symbol table for global symbols (.symtab) 2324: 0x0 0x0 0x0 0x1F Offset within the string table: 31 bytes 2328: 0x0 0x0 0x0 0x2 Section type: Symbol table 2332: 0x0 0x0 0x0 0x2 Flags: the section occupies memory 2336: 0x0 0x0 0x0 0x0 Address: (NA) 2340: 0x0 0x0 0x5 0x34 Offset in the file: 1332 bytes 2344: 0x0 0x0 0x0 0xC0 Size of the section: 192 bytes (1332 - 1523) 2348: 0x0 0x0 0x0 0x6 Link: section header index of the associated string table: index 6 (.strtab) 2352: 0x0 0x0 0x0 0x6 Info: ?? 2356: 0x0 0x0 0x0 0x4 Address alignment: 4-byte boundary 2360: 0x0 0x0 0x0 0x10 Entry size: 16-bytes Entry: 6 String table for the symbol table (.strtab) 2364: 0x0 0x0 0x0 0x27 Offset within the string table (.shstrtab): 39 2368: 0x0 0x0 0x0 0x3 Type: 3 : string table 2372: 0x0 0x0 0x0 0x2 Flags: the section occupies memory 2376: 0x0 0x0 0x0 0x0 Address: (NA) 2380: 0x0 0x0 0x5 0xF4 Offset in the file: 1524 bytes 2384: 0x0 0x0 0x0 0x41 Size of the section: 65 bytes (1524 - 1588) 2388: 0x0 0x0 0x0 0x0 Link: (NA) 2392: 0x0 0x0 0x0 0x0 Info: (NA) 2396: 0x0 0x0 0x0 0x1 Alignment: none 2400: 0x0 0x0 0x0 0x0 Size of an entry Entry: 7 Relocation table for .text 2404: 0x0 0x0 0x0 0x2F Section name: offset within the string table (.rela.text) - 47 bytes 2408: 0x0 0x0 0x0 0x4 Section type: relocation entry table 2412: 0x0 0x0 0x0 0x2 Flags: 2: memory allocation for this section 2416: 0x0 0x0 0x0 0x0 Address: NA 2420: 0x0 0x0 0x6 0x38 Offset of the section in the file: 1592 bytes 2424: 0x0 0x0 0x1 0xA4 Size of the section: 420 bytes (1592 - 2011) 2428: 0x0 0x0 0x0 0x5 Link: section header index of the corresponding symbol table: 5 (.symtab) 2432: 0x0 0x0 0x0 0x2 Info: section header index of the section where relocation is done: 2 (.text) 2436: 0x0 0x0 0x0 0x4 Alignment: 4-byte boundart 2440: 0x0 0x0 0x0 0xC Size oof an entry: 12 bytes (35 ntries) Entry: 8 Section .comment 2444: 0x0 0x0 0x0 0x3A Offset within the string table (.comment): 58 2448: 0x0 0x0 0x0 0x1 Type: 1: program bits 2452: 0x0 0x0 0x0 0x0 Flags: writable data 2456: 0x0 0x0 0x0 0x0 Address: NA 2460: 0x0 0x0 0x7 0xDC Offset in the file: 2012 bytes 2464: 0x0 0x0 0x0 0x70 Size: 112 bytes (2012 - 2123) 2468: 0x0 0x0 0x0 0x0 Link: NA 2472: 0x0 0x0 0x0 0x0 Info: NA 2476: 0x0 0x0 0x0 0x1 Address alignment: Nil 2480: 0x0 0x0 0x0 0x0 Entry size