[PATCH] Valid relocation symbol for FLAT format on ARM
Jamie Lokier
jamie at shareable.org
Wed Dec 30 13:49:29 EST 2009
Jun Sun wrote:
> (Sent to linux-kernel, but seems nobody cared. Hopefully someone here
> can pick it up)
I've included uclinux-dev at uclinux.org, because that's where I've seen
most discussion of FLAT format in general.
> Apparently newer GCC would generate ANCHOR symbols beyond the end of
> data/bss segment on ARM CPUs. As a result, the exiting validity checking
> for relocation symbols in FLAT format will fail for some programs.
> -#define flat_reloc_valid(reloc, size) ((reloc) <= (size))
> +#define flat_reloc_valid(reloc, size) ((reloc) <= (size) + 0x1000)
Why 0x1000? Is that an arbitrary number, or does it have a specific
meaning for GCC?
> This also fixes a cosmetic error in printk. Text segment and data/bss
> segment are allocated from two different areas. It is not meaningful to
> give the diff between them in error reporting messages.
That part looks fine to me.
-- Jamie
ps. Russell, proof that someone is using no-MMU ARM? :-)
I'll get back to your earlier mail on that subject when I have more time, btw.
More information about the linux-arm-kernel
mailing list