Use of default.ld in linking

elston at edwards-saftd-2.af.mil elston at edwards-saftd-2.af.mil
Sat Mar 16 03:12:11 AEST 1991


We have been struggling with an apparent memory conflict.  In the process of
investigating this conflict we have tried changing the default linker loader
instructions.  Our system (68020 VME running System V 2.3 with 2 Megabytes of 
physical memory on the main processor and another 2 Meg on another node) came 
with the following default.ld

MEMORY {
		valid : org = 0x0, len = 0x200000
}
SECTIONS {
	.text : {}
	GROUP ALIGN(65536) : {
			.data : {}
			.bss  : {}
			}
	}


When we change the alignment from 64K to something like 128 bytes or over 128K
and compile with the -g option then we get error messages  like

	prog: w\N(ILX^O.<UU/: cannot open
	prog: _|^LB.^?x^L.^D^?xl,: not found
	prog: syntax error at line 5: `(' unexpected

This implies (at least to me) that the text area is being corrupted with the
line number information, the symbol table information, or just the .data and
.bss sections.  Trying to debug with sdb will allow us to see the source code
as it appears in the original but when trying to run under sdb we get

	Returned from execve: Exec format error
	Cannot ptrace child process; try again.: No such process

It seems to be connected with the problem of running it from the command line.

Any ideas?  Why should the alignment make such a difference?  Any help would be
appreciated.
-- 
##############################################################################
# A mind is a terrible thing to waste -      elston at edwards-saftd-2.af.mil   #
#     Thank goodness mine's all used up.                                     #
#                                                                            #
# If the author has expressed any opinions here they are purely              #
#  accidental and should be ignored.                                         #
##############################################################################



More information about the Comp.unix.programmer mailing list