GCC3.4.3 (powerpc-linux-gcc) bug in generating (".initcall.init") section??

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
I am using GCC3.4.3 (powerpc-linux-gcc) to build MontaVista embedded Linux.
It seems like
the GCC3.4.3 does not generate the (".initcall.init") section correctly for
the drivers'
init calls (Initialization pointers are missing in the section). However, if
I modify the
__initcall(fn) (delete the static word in that definition), then it starts
to work. Is this
the bug in GCC3.4.3 (powerpc) or am I missing something?

The following are the Map file outputs:

/*
* Used for initialization calls..
*/
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);

extern initcall_t __initcall_start, __initcall_end;

#define __initcall(fn) \
static initcall_t __initcall_##fn __init_call = fn
#define __exitcall(fn) \
static exitcall_t __exitcall_##fn __exit_call = fn

c0218460 D __setup_pci_setup
c0218468 D __setup_netdev_boot_setup
c0218470 D __setup_nfsaddrs_config_setup
c0218478 D __setup_ip_auto_config_setup
c0218480 A __initcall_start
c0218480 A __setup_end
c0218480 t __initcall_init_reiserfs_fs
c0218484 t __initcall_iic_init
c0218488 A __initcall_end
c0219000 A __bss_start
c0219000 A __chrp_begin
c0219000 A __chrp_end
c0219000 A __init_end
c0219000 A __openfirmware_begin


**** static word is deleted *******

/*
* Used for initialization calls..
*/
typedef int (*initcall_t)(void);
typedef void (*exitcall_t)(void);

extern initcall_t __initcall_start, __initcall_end;

#define __initcall(fn) \
initcall_t __initcall_##fn __init_call = fn
#define __exitcall(fn) \
exitcall_t __exitcall_##fn __exit_call = fn


c02496e0 D __setup_pci_setup
c02496e8 D __setup_netdev_boot_setup
c02496f0 D __setup_nfsaddrs_config_setup
c02496f8 D __setup_ip_auto_config_setup
c0249700 A __initcall_start
c0249700 A __setup_end
c0249700 T __initcall_ocp_uart_init
c0249704 T __initcall_ocp_proc_init
c0249708 T __initcall_abi_register_sysctl
c024970c T __initcall_spawn_ksoftirqd
c0249710 T __initcall_uid_cache_init
c0249714 T __initcall_init_posix_timers
c0249718 T __initcall_init_mvlversion
c024971c T __initcall_ikconfig_init
c0249720 T __initcall_kmem_cpucache_init
c0249724 T __initcall_kswapd_init
c0249728 T __initcall_init_shmem_fs
c024972c T __initcall_bdflush_init
c0249730 T __initcall_init_pipe_fs
c0249734 T __initcall_fasync_init
c0249738 T __initcall_filelock_init
c024973c T __initcall_dnotify_init
c0249740 T __initcall_init_script_binfmt
c0249744 T __initcall_init_elf_binfmt
c0249748 T __initcall_init_ext3_fs
c024974c T __initcall_journal_init
c0249750 T __initcall_init_ext2_fs
c0249754 T __initcall_init_cramfs_fs
c0249758 T __initcall_init_ramfs_fs
c024975c T __initcall_init_fat_fs
c0249760 T __initcall_init_msdos_fs
c0249764 T __initcall_init_vfat_fs
c0249768 T __initcall_init_devfs_fs
c024976c T __initcall_init_reiserfs_fs
c0249770 T __initcall_init_devpts_fs
c0249774 T __initcall_init_xfs_fs
c0249778 T __initcall_chr_dev_init
c024977c T __initcall_raw_init
c0249780 T __initcall_rs_init
c0249784 T __initcall_ppc405wd_init
c0249788 T __initcall_ibm_gpio_init
c024978c T __initcall_device_init
c0249790 T __initcall_rd_init
c0249794 T __initcall_loop_init
c0249798 T __initcall_init_ppc405_enet
c024979c T __initcall_tun_init
c02497a0 T __initcall_init_scsi
c02497a4 T __initcall_init_sd
c02497a8 T __initcall_init_sg
c02497ac T __initcall_ieee1394_init
c02497b0 T __initcall_ohci1394_init
c02497b4 T __initcall_sbp2_module_init
c02497b8 T __initcall_iic_init
c02497bc T __initcall_pci_proc_init
c02497c0 T __initcall_rtc_init
c02497c4 T __initcall_usb_init
c02497c8 T __initcall_init
c02497cc T __initcall_ohci_hcd_init
c02497d0 T __initcall_usblp_init
c02497d4 T __initcall_usb_stor_init
c02497d8 T __initcall_input_init
c02497dc T __initcall_evdev_init
c02497e0 T __initcall_netlink_proto_init
c02497e4 T __initcall_inet_init
c02497e8 T __initcall_ip_auto_config
c02497ec T __initcall_packet_init
c02497f0 A __initcall_end
c024a000 A __bss_start
c024a000 A __chrp_begin
c024a000 A __chrp_end
c024a000 A __init_end
c024a000 A __openfirmware_begin





Re: GCC3.4.3 (powerpc-linux-gcc) bug in generating (".initcall.init") section??
Quoted text here. Click to load it

<snip>

AFAIK, Montavista bundle R3.3.1 with their latest release, not any of
the 3.4.x releases. They're not going to support you if you won't run
their compiler.

Site Timeline