Script started on Wed Oct 17 23:28:50 2001 linux3% nasm -f elf -l sep1.lst sep1.asm linux3% nasm -f elf -l spe2.lst sep2.asm linux3% ld sep1.o sep2.o linux3% a.out linux3% echo $? 92 linux3% linux3% objdump -h sep1.o sep1.o: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .data 00000009 00000000 00000000 00000180 2**2 CONTENTS, ALLOC, LOAD, DATA 1 .text 00000023 00000000 00000000 00000190 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 2 .comment 0000001c 00000000 00000000 000001c0 2**0 CONTENTS, READONLY linux3% objdump -t esep21.o sep1.o: file format elf32-i386 SYMBOL TABLE: 00000000 l df *ABS* 00000000 sep1.asm 00000000 l d *ABS* 00000000 00000000 l d .data 00000000 00000000 l d .text 00000000 00000000 l .data 00000000 foo 00000005 l .data 00000000 lvar1 00000000 *UND* 00000000 gvar2 00000000 *UND* 00000000 add_these 00000001 g .data 00000000 gvar1 00000000 g .text 00000000 _start linux3% objdump -h sep2.o sep2.o: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .data 0000000a 00000000 00000000 00000180 2**2 CONTENTS, ALLOC, LOAD, DATA 1 .text 0000001d 00000000 00000000 00000190 2**4 CONTENTS, ALLOC, LOAD, RELOC, READONLY, CODE 2 .comment 0000001c 00000000 00000000 000001b0 2**0 CONTENTS, READONLY linux3% objcump dump -h sep linux3% objdump -t sep2.o sep2.o: file format elf32-i386 SYMBOL TABLE: 00000000 l df *ABS* 00000000 sep2.asm 00000000 l d *ABS* 00000000 00000000 l d .data 00000000 00000000 l d .text 00000000 00000000 l .data 00000000 bar 00000006 l .data 00000000 lvar1 00000000 *UND* 00000000 gvar1 00000002 g .data 00000000 gvar2 00000000 g .text 00000000 add_these linux3% objdump -h a.out a.out: file format elf32-i386 Sections: Idx Name Size VMA LMA File off Algn 0 .text 0000004d 08048080 08048080 00000080 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 1 .data 00000016 080490d0 080490d0 000000d0 2**2 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000002 080490e6 080490e6 000000e6 2**0 CONTENTS 3 .comment 00000038 00000000 00000000 000000e8 2**0 CONTENTS, READONLY linux3% objdump -t a.out a.out: file format elf32-i386 SYMBOL TABLE: 08048080 l d .text 00000000 080490d0 l d .data 00000000 080490e6 l d .bss 00000000 00000000 l d .comment 00000000 00000000 l d *ABS* 00000000 00000000 l d *ABS* 00000000 00000000 l d *ABS* 00000000 00000000 l df *ABS* 00000000 sep1.asm 080490d0 l .data 00000000 foo 080490d5 l .data 00000000 lvar1 00000000 l df *ABS* 00000000 sep2.asm 080490dc l .data 00000000 bar 080490e2 l .data 00000000 lvar1 080480cd g O *ABS* 00000000 _etext 080480b0 g .text 00000000 add_these 08048080 g .text 00000000 _start 080490de g .data 00000000 gvar2 080490e6 g O *ABS* 00000000 __bss_start 080490d1 g .data 00000000 gvar1 080490e6 g O *ABS* 00000000 _edata 080490e8 g O *ABS* 00000000 _end linux3% objdump -d a.out a.out: file format elf32-i386 Disassembly of section .text: 08048080 <_start>: 8048080: a1 d1 90 04 08 mov 0x80490d1,%eax 8048085: 8b 1d de 90 04 08 mov 0x80490de,%ebx 804808b: 8b 0d d5 90 04 08 mov 0x80490d5,%ecx 8048091: e8 1a 00 00 00 call 80480b0 8048096: 8b 1d d1 90 04 08 mov 0x80490d1,%ebx 804809c: b8 01 00 00 00 mov $0x1,%eax 80480a1: cd 80 int $0x80 80480a3: 90 nop 80480a4: 90 nop 80480a5: 90 nop 80480a6: 90 nop 80480a7: 90 nop 80480a8: 90 nop 80480a9: 90 nop 80480aa: 90 nop 80480ab: 90 nop 80480ac: 90 nop 80480ad: 90 nop 80480ae: 90 nop 80480af: 90 nop 080480b0 : 80480b0: c7 05 d1 90 04 08 00 movl $0x0,0x80490d1 80480b7: 00 00 00 80480ba: 01 05 d1 90 04 08 add %eax,0x80490d1 80480c0: 01 1d d1 90 04 08 add %ebx,0x80490d1 80480c6: 01 0d d1 90 04 08 add %ecx,0x80490d1 80480cc: c3 ret linux3% linux3% objdump -s a.out a.out: file format elf32-i386 Contents of section .text: 8048080 a1d19004 088b1dde 9004088b 0dd59004 ................ 8048090 08e81a00 00008b1d d1900408 b8010000 ................ 80480a0 00cd8090 90909090 90909090 90909090 ................ 80480b0 c705d190 04080000 00000105 d1900408 ................ 80480c0 011dd190 0408010d d1900408 c3 ............. Contents of section .data: 80490d0 12170000 00420000 00000000 07000300 .....B.......... 80490e0 00000200 0000 ...... Contents of section .bss: 80490e6 0000 .. Contents of section .comment: 0000 00546865 204e6574 77696465 20417373 .The Netwide Ass 0010 656d626c 65722030 2e393800 00546865 embler 0.98..The 0020 204e6574 77696465 20417373 656d626c Netwide Assembl 0030 65722030 2e393800 er 0.98. linux3% exit exit Script done on Wed Oct 17 23:31:15 2001