All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] Add __initbss section
@ 2007-10-11  9:52 Franck Bui-Huu
  2007-10-11  9:54 ` [PATCH 1/2] Add .init.bss section Franck Bui-Huu
                   ` (4 more replies)
  0 siblings, 5 replies; 26+ messages in thread
From: Franck Bui-Huu @ 2007-10-11  9:52 UTC (permalink / raw)
  To: Ralf Baechle, Maciej W. Rozycki, Geert Uytterhoeven; +Cc: linux-mips

Hi,

As discussed previously, it seems a good idea to create a new init
section .init.bss that store uninitialized data used only at boot
time. That way, we can avoid to embed these uninitialized data in the
Linux image since it's totaly useless.

As a good candidate for using this, is tlbex.c. This file allocates a
couple of big arrays that don't need to be part of the init data
section since they're not initialized and they're currently only used
at boot time.

So this patchset does this but the result looks weird: I tried to
apply this patch on top of the patchset:

---8<---

diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index a61246d..8271eab 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -743,11 +743,11 @@ il_bgez(u32 **p, struct reloc **r, unsigned int reg, enum label_id l)
  * We deliberately chose a buffer size of 128, so we won't scribble
  * over anything important on overflow before we panic.
  */
-static __initdata u32 tlb_handler[128];
+static __initbss u32 tlb_handler[128];
 
 /* simply assume worst case size for labels and relocs */
-static __initdata struct label labels[128];
-static __initdata struct reloc relocs[128];
+static __initbss struct label labels[128];
+static __initbss struct reloc relocs[128];

--->8---

and the kernel image is bigger after the patch is applied !

$ ls -l vmlinux*
-rwxrwxr-x 1 fbuihuu fbuihuu 2503324 2007-10-11 11:41 vmlinux*
-rwxrwxr-x 1 fbuihuu fbuihuu 2503264 2007-10-11 11:41 vmlinux~old*

Could anybody explain me why ? The time is missing and I probably
couldn't investigate into this until this weekend. 

Also not that with the current patchset applied, there are now 2
segments that need to be loaded, hopefully it won't cause any issues
with any bootloaders out there that would assume that an image has
only one segment...

Other question: I noticed that the exit.data section is not
discarded. Could anybody give me the reason why ?

		Franck

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2007-11-05 20:34 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-11  9:52 [RFC] Add __initbss section Franck Bui-Huu
2007-10-11  9:54 ` [PATCH 1/2] Add .init.bss section Franck Bui-Huu
2007-10-11  9:58 ` [PATCH 2/2] Add .init.bss section for MIPS Franck Bui-Huu
2007-10-11 12:44 ` [RFC] Add __initbss section Ralf Baechle
2007-10-11 13:35   ` Maciej W. Rozycki
2007-10-11 14:00     ` Ralf Baechle
2007-10-11 14:49       ` Maciej W. Rozycki
2007-10-14 19:42   ` Franck Bui-Huu
2007-10-15 16:01     ` Ralf Baechle
2007-10-16  8:33       ` Franck Bui-Huu
2007-10-11 13:19 ` Maciej W. Rozycki
2007-10-14 19:52   ` Franck Bui-Huu
2007-10-15 12:19     ` Maciej W. Rozycki
2007-10-15 20:06       ` Franck Bui-Huu
2007-10-16 10:29         ` Maciej W. Rozycki
2007-10-18 20:28           ` Franck Bui-Huu
2007-10-19 11:59             ` Maciej W. Rozycki
2007-11-04  8:29               ` Franck Bui-Huu
2007-11-05 12:38                 ` Maciej W. Rozycki
2007-11-05 20:32                   ` Franck Bui-Huu
2007-10-11 15:26 ` Thiemo Seufer
2007-10-11 16:16   ` Maciej W. Rozycki
2007-10-11 16:25     ` Ralf Baechle
2007-10-11 17:07       ` Maciej W. Rozycki
2007-10-11 16:39     ` Thiemo Seufer
2007-10-14 19:53   ` Franck Bui-Huu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.