This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: At wit's end with linker...help please!


On Tue, Oct 30, 2007 at 07:02:02PM -0700, Rick Mann wrote:
> I have a file vectors.S that assembles to vector.o. My linker script  
> has a part:
> 
> 	. = ALIGN(4);
> 	.text :
> 	{
> 		obj/start.o(.text);
> 		src/Interrupts.o(.text);
> 		*(.text);
> 		
> 		. = ALIGN(4);
> 		gVectorsStart = .;
> 		KEEP (obj/vectors.o(.text));
> 		gVectorsEnd = .;
> 	}
[snip]
> 
> But the output map shows that gVectorsStart/End have the same value:

Isn't that because it's being linked in before gVectorsStart, by
"*(.text);" ?  ;-)

To check, you could run "arm-elf-objdump -d" on the linker output file.

Alternatively, if there's a global symbol in vectors.S, then generating
a map file from ld would show where that lobs up.

For an easier way to write the above, you might find mileage in "3.6.4.1
Input Section Basics" in "info ld". (EXCLUDE_FILE comes to mind.)

Erik


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]