[coreboot] a question about reset16.lds

Patrick Georgi patrick at georgi-clan.de
Tue Feb 1 17:45:03 CET 2011


Am 01.02.2011 12:46, schrieb ali hagigat:
> SECTIONS {
> 	/* Trigger an error if I have an unuseable start address */
> 	_bogus = ASSERT(_start>= 0xffff0000, "_start too low. Please
> decrease CONFIG_ROM_IMAGE_SIZE");
> 	_ROMTOP = 0xfffffff0;
> 	. = _ROMTOP;
> 	.reset . : {
> 		*(.reset)
> 		. = 15 ;
> 		BYTE(0x00);
> 	}
> }
> ------------------------------------------------------------------
> What does (.=15;) mean? It seems a mistake! and can be: . = .+1;
. = 15; means "set the location pointer to 15". With the byte that's 
written right after that, this means that .reset is exactly 16 bytes.
If it's less, ". = 15" pads the section to be larger, if it would have 
to be larger, ". = 15" makes the linker fail (because the location 
pointer must not go backwards).

I guess that also answers why ". = .+1" is no adequate substitute.


Patrick




More information about the coreboot mailing list