Messages in this thread | | | From | "Manfred Spraul" <> | Subject | Re: [patch] 2.3.99-pre3-3: dev_alloc_name | Date | Tue, 21 Mar 2000 18:13:03 +0100 |
| |
From: "Andrew Morton" <andrewm@uow.edu.au> > > [morton@victoria net]$ strings Space.o > eip: %p > /usr/src/linux/include/asm/spinlock.h > kernel BUG at %s:%d! > /usr/src/linux/include/asm/spinlock.h > kernel BUG at %s:%d!
It's worse: even without -fwritable-stings, gcc doesn't merge identical strings properly: these strings appears 100 times in my vmlinux file. I removed the printk from BUG, and that saved ~ 60 kB data area. I don't know how much we could save if _all_ identical strings get merged.
Does anyone know how gcc+ld merge identical strings, and if that works if an identical string appears in different files? IIRC MSVC creates a special symbol for each string with an automatic name: the mangled contents of the string. The linker then merges the identically named symbols.
I think the linker should support that [required for certain static inline tricks], but I don't know know if gcc uses that feature.
Btw, IIRC someone proposed to mark the .rodata section as read-only: that won't work because the complete kernel is mapped with 4 MB pte's :-(
-- <amfred
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |