lkml.org 
[lkml]   [1999]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateWed, 6 Jan 1999 09:10:19 -0800
FromRichard Henderson <>
SubjectRe: Bad code with __initfunc() and gcc-2.7.2.3
On Wed, Jan 06, 1999 at 05:53:27PM +0100, Jes Sorensen wrote:
> I am seing a really strange problem with one of my drivers (the AceNIC
> Gigabit Ethernet one) when I compile it statically into the kernel using
> 2.2.0pre4 and gcc-2.7.2.3 as it comes with Red Hat 5.2. When compiled as
> a module the code seems to be fine.

The problem is detected and reported by egcs --

drivers/net/acenic.c: In function `acenic_probe':
drivers/net/acenic.c:142: acenic_probe causes a section type conflict
drivers/net/acenic.c: In function `ace_init':
drivers/net/acenic.c:403: ace_init causes a section type conflict
drivers/net/acenic.c: In function `ace_copy':
drivers/net/acenic.c:1505: ace_copy causes a section type conflict
drivers/net/acenic.c: In function `ace_load_firmware':
drivers/net/acenic.c:1559: ace_load_firmware causes a section type conflict

The bug is in acenic_firmware.h --

u32 tigonFwText[(MAX_TEXT_LEN/4) + 1] __init = {
That should be __initdata. Since it is __init, .text.init gets
marked as being a data section rather than a code section, so
alignment pads with zeros instead of nops.



r~

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2010