failed to merge string constant? (gcc 3.4.2 + binutils 2.15)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have some strange kernel panic with gcc 3.4.2 + binutils 2.15.
Address of some string constant seems broken.

For example, scsi_init_procfs() is compled to following code.

int __init scsi_init_procfs(void)
{
	struct proc_dir_entry *pde;

	proc_scsi = proc_mkdir("scsi", NULL);
	if (!proc_scsi)
		goto err1;
...

803d47f4 <scsi_init_procfs> 27bdffe8 	addiu	sp,sp,-24
803d47f8 <scsi_init_procfs+0x4> afb00010 	sw	s0,16(sp)
803d47fc <scsi_init_procfs+0x8> 3c108030 	lui	s0,0x8030
803d4800 <scsi_init_procfs+0xc> 2604c7e0 	addiu	a0,s0,-14368
803d4804 <scsi_init_procfs+0x10> afbf0014 	sw	ra,20(sp)
803d4808 <scsi_init_procfs+0x14> 0c03536f 	jal	800d4dbc <proc_mkdir>
803d480c <scsi_init_procfs+0x18> 00002821 	move	a1,zero

Then, 0x80300000-14368 = 0x802fc7e0 must contain a string "scsi".  But
when I loaded the kernel (ELF or binary), there is obvious wrong data.

802fc7e0  74 20 77 72 69 74 65 20  43 54 52 20 77 68 69 6c   t write CTR whil
802fc7f0  65 20 72 65 67 69 73 74  65 72 69 6e 67 2e 0a 00   e registering...
802fc800  3c 36 3e 73 65 72 69 6f  3a 20 69 38 30 34 32 20   <6>serio: i8042 
802fc810  25 73 20 70 6f 72 74 20  61 74 20 25 23 6c 78 2c   %s port at %#lx,

If I compiled kernel with -fno-merge-constants, this problem does not
happen.  gcc 3.3.4 + bintuils 2.15 also works fine.

Does anyone see this sort of problem?

---
Atsushi Nemoto


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux