From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 19 Nov 2010 13:38:00 +0100 Subject: [U-Boot] [PATCH v3] Switch from archive libraries to partial linking In-Reply-To: References: <20101110080708.GA8145@safe.home.local> <20101115075129.9C820134FEF@gemini.denx.de> <20101115080950.GA26767@safe.home.local> <20101115105407.2A24714EA7E@gemini.denx.de> <20101117133056.GB23875@safe.home.local> <20101118214448.B8DC014EA7E@gemini.denx.de> <20101119080833.5DD9714EA7E@gemini.denx.de> <20101119111112.A53E214EA7E@gemini.denx.de> Message-ID: <4CE66FA8.9080008@free.fr> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Le 19/11/2010 13:33, Sebastien Carlier a ?crit : > Dear Wolfgang, > > On 2010-11-19 12:11:12, Wolfgang Denk wrote: >> >> In message you wrote: >>> >> The used flash chips are so-called bootom boot sector types; using two >> chips in 16 bit config in parallel (to get a 32 bit bus) we see this >> flash layout: >> >> Sector Start Addresses: >> 40000000 RO 40008000 RO 4000C000 RO 40010000 RO 40020000 RO >> 40040000 RO 40060000 E 40080000 E 400A0000 E 400C0000 E >> 400E0000 E 40100000 E 40120000 E 40140000 E 40160000 E >> 40180000 E 401A0000 E 401C0000 E 401E0000 E 40200000 E >> 40220000 E 40240000 E 40260000 E 40280000 E 402A0000 E >> 402C0000 E 402E0000 E 40300000 E 40320000 E 40340000 E >> 40360000 E 40380000 E 403A0000 E 403C0000 E 403E0000 E >> >> So erase block sizes are 32 k, 16 k, 16 k, 64 k, 128 k, 128 k, 128 k, ... > > Oh, I see. I wasn't aware that some flash chips had non-uniform sector > sizes. It makes perfect sense not to waste much of a larger sector to > store the environment. Thank you very much for clarifying! > >> The linker script squeezes as many as possible objects into the first >> 32 kB ssector, then creates a gap for the environment, and ten >> continues to place the remaining objects starting at offset 40010000. > > Is it not possible to tell the linker to place a made-up 32 kB symbol > within the text section at address 0x40008000? I am not familiar enough > with ld to tell whether there are restrictions for setting the absolute > address of a symbol that would disallow it in this case. > > Regards, You can force a symbol to reside at a given offset, but that will not make the linker "skip" that symbol when filling the output section, if that's what you meant. If you read up the binutils doc, you'll see that ld fills output sections based on a "location pointer" (the "dot") that simply moves on with each input section added -- no skipping, and no jumping from one region to another either. Amicalement, -- Albert.