From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 25 Apr 2012 14:01:00 -0500 Subject: [U-Boot] [PATCH] PowerPC: Change -fpic flag to -fPIC flag in the config.mk In-Reply-To: References: <1334719161-3500-1-git-send-email-Chunhe.Lan@freescale.com> <20120418060356.4F9D9200229@gemini.denx.de> <4F8E6E06.3060101@freescale.com> Message-ID: <4F9849EC.1070307@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/18/2012 05:07 AM, Joakim Tjernlund wrote: > Your linker file is buggy I think. I found u-boot-nand_spl.lds, is that the one? That's the one for the SPL part. > Check out that files reloc part: > .reloc : { > _GOT2_TABLE_ = .; > KEEP(*(.got2)) > _FIXUP_TABLE_ = .; > KEEP(*(.fixup)) > } > __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; > __fixup_entries = (. - _FIXUP_TABLE_) >> 2; > > Compare that with(from u-boot.lds): > .reloc : > { > _GOT2_TABLE_ = .; > KEEP(*(.got2)) > KEEP(*(.got)) > PROVIDE(_GLOBAL_OFFSET_TABLE_ = . + 4); > _FIXUP_TABLE_ = .; > KEEP(*(.fixup)) > } > __got2_entries = ((_GLOBAL_OFFSET_TABLE_ - _GOT2_TABLE_) >> 2) - 1; > __fixup_entries = (. - _FIXUP_TABLE_) >> 2; I notice a difference between u-boot.lds and u-boot-nand.lds -- the latter (used for the main part of U-Boot when loaded from SPL) has: > .reloc : > { > KEEP(*(.got)) > _GOT2_TABLE_ = .; > KEEP(*(.got2)) > _FIXUP_TABLE_ = .; > KEEP(*(.fixup)) > } > __got2_entries = (_FIXUP_TABLE_ - _GOT2_TABLE_) >> 2; > __fixup_entries = (. - _FIXUP_TABLE_) >> 2; Is this wrong as well? -Scott