rk: fix PIE support multi cpu
author黄涛 <huangtao@rock-chips.com>
Tue, 8 Apr 2014 00:47:46 +0000 (08:47 +0800)
committer黄涛 <huangtao@rock-chips.com>
Tue, 8 Apr 2014 00:47:46 +0000 (08:47 +0800)
arch/arm/kernel/pie.lds.S
lib/pie.c

index 0953281739d034c090e3f3c93c74947e304b582d..921b746acd6344fcb0c6409d772418e0cb8eb258 100755 (executable)
@@ -33,6 +33,7 @@ SECTIONS
 
        PIE_OVERLAY_START
        OVERLAY : NOCROSSREFS {
+               PIE_OVERLAY_SECTION(overlay)
                PIE_OVERLAY_SECTION(rk3288)
                PIE_OVERLAY_SECTION(rk3188)
        }
index 2aa0fc996985d765640c0adcd7ebf3fe73b3f65f..c266a61bad72146eee2ec438f0a99721cfc683ff 100644 (file)
--- a/lib/pie.c
+++ b/lib/pie.c
@@ -64,7 +64,7 @@ struct pie_chunk *__pie_load_data(struct gen_pool *pool, bool phys,
                goto err;
        }
 
-       common_sz = code_start - (void *)__pie_common_start;
+       common_sz = __pie_overlay_start - __pie_common_start;
        code_sz = code_end - code_start;
 
        chunk->pool = pool;