In my previous message I jumped to the fix, rather than giving you just the problem. Sorry about that.
Here's a little program: crt0.s: .text .even .globl _start _start: mov $0140000, sp mov sp, r5 mov argv, -(sp) /* argv */ mov $1, -(sp) /* argc */ jsr pc, ___main add $4, sp halt rts pc .even .globl ___main ___main: rts pc .data arg1: .asciz "stand-alone" .even argv: .word arg1 Now run: dab@malabar> pdp11-aout-as -o crt0.o crt0.s dab@malabar> pdp11-aout-ld -nostdlib -o crt0 crt0.o dab@malabar> pdp11-aout-objdump -x crt0 crt0: file format a.out-pdp11 crt0 architecture: pdp11, flags 0x000000be: EXEC_P, HAS_LINENO, HAS_DEBUG, HAS_SYMS, HAS_LOCALS, WP_TEXT start address 0x00000000 Sections: Idx Name Size VMA LMA File off Algn 0 .text 0000001c 00000000 00000000 00000010 2**1 CONTENTS, ALLOC, LOAD, CODE 1 .data 0000000e 00000400 00000400 0000002c 2**1 CONTENTS, ALLOC, LOAD, DATA 2 .bss 00000002 0000040e 0000040e 00000000 2**1 ALLOC SYMBOL TABLE: 00000000 l .text 0000 00 02 crt0.o 00000000 g .text 0000 00 22 _start 0000010c l .data 0000 00 03 argv 0000001a g .text 0000 00 22 ___main 00000100 l .data 0000 00 03 arg1 0000001c g .text 0000 00 22 __etext 0000001c g .text 0000 00 22 _etext 00000110 g .bss 0000 00 24 __end 0000010e g .data 0000 00 23 __edata 0000010e g .bss 0000 00 24 __bss_start 0000010e g .data 0000 00 23 _edata 00000110 g .bss 0000 00 24 _end Notice in the symbol table that arg1, the first item in the .data segment, has the value 100 while the VMA and LMA of the .data segment are 400. I tried setting TARGET_PAGE_SIZE in bfd/pdp11.c to 256, the same value it has in ld/emulparams/pdp11.sh, and that disagreement went away. -Dave _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils