Skip to contentSkip to conversation

linux-next: arm build failures

PATCH In review Stephen Rothwell 4 participants 8 messages Jun 17, 2009 – Jun 20, 2009 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi Russell,

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

I first saw this with next-20090615 i.e. Monday's tree. Some configs seem to have recovered, but others only hit it yesterday and some have not hit it at all. See http://kisskb.ellerman.id.au/kisskb/branch/9/

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#1 lore raw
Quoted 11 lines · Stephen Rothwell

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

I reported an error with kallsysms on ARM this Monday leading to inconsistent data:

http://lkml.org/lkml/2009/6/15/233

Could it be related?

Signature · 1 line
Catalin
#2 lore raw

Hi Catalin,

Quoted 14 lines · On Wed, 17 Jun 2009 09:34:31 +0100 Catalin Marinas <[email protected]>…
Quoted 11 lines · Stephen Rothwell

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

Quoted 6 lines

I reported an error with kallsysms on ARM this Monday leading to inconsistent data:

http://lkml.org/lkml/2009/6/15/233

Could it be related?

Could be. I have added the proposed fix patch to my fixes tree until Linus or Sam gets around to including it.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#3 lore raw
Quoted 20 lines · Stephen Rothwell

Hi Catalin,

Quoted 17 lines · On Wed, 17 Jun 2009 09:34:31 +0100 Catalin Marinas <[email protected]>…
Quoted 11 lines · Stephen Rothwell

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

I reported an error with kallsysms on ARM this Monday leading to inconsistent data:

Quoted 6 lines
Quoted 3 lines

http://lkml.org/lkml/2009/6/15/233

Could it be related?

Could be. I have added the proposed fix patch to my fixes tree until Linus or Sam gets around to including it.

No, I don't think it's got anything to do with it. It's the kallsyms generator that's getting confused.

What's happening is that we're ending up with differences between the symbolic information generated for .tmp_vmlinux2 and vmlinux:

c024c638 t svc_pool_stats_seq_ops
c024c648 t rpc_proc_fops
c024c6b0 T kallsyms_addresses
-c024ea10 T kallsyms_num_syms
-c024ea20 T kallsyms_names
-c0253990 T kallsyms_markers
-c02539c0 T kallsyms_token_table
-c0253d70 T kallsyms_token_index
+c024ea00 T kallsyms_num_syms
+c024ea10 T kallsyms_names
+c0253970 T kallsyms_markers
+c02539a0 T kallsyms_token_table
+c0253d50 T kallsyms_token_index
c027b000 r __pci_fixup_PCI_VENDOR_ID_VIA0x324equirk_via_cx700_pci_parking_caching c027b000 R __start_pci_fixups_early
c027b000 R __start_rodata

Quoted 1 line

From what I can tell, what happens is the following:

- link kernel into .tmp_vmlinux1 - thereby containing only weak references to the kallsyms data

- generate .tmp_kallsyms1.S and assemble it
- link kernel plus .tmp_kallsyms1.o into .tmp_vmlinux2. This now contains kallsyms data, but based upon the kernel without any such data. The symbolic addresses are therefore all wrong.

- generate .tmp_kallsyms2.S and assemble it
- link kernel plus .tmp_kallsyms2.o into vmlinux. This contains the kallsyms data, but in theory the only difference is that the addresses should now be correct.

Now, what seems to be happening in this case is that for .tmp_vmlinux1, _etext != _data - in other words, the ". = ALIGN(THREAD_SIZE);" statement is having to do something:

c02880c4 R __stop___param
c0289000 R __end_rodata
c0289000 A _etext
c028a000 A __data_loc
c028a000 D _data
c028a000 D _sdata
c028a000 D init_thread_union

However, for .tmp_vmlinux2, _etext == _data:

c028f0c4 R __stop___param
c0290000 A __data_loc
c0290000 R __end_rodata
c0290000 D _data
c0290000 A _etext
c0290000 D _sdata
c0290000 D init_thread_union

I think the significance of this is the sorting algorithm in kallsyms.c, and therefore the way the symbolic information gets compressed. This causes the tables produced in .tmp_kallsyms1.S and .tmp_kallsyms2.S to be rather different - particularly size-wise - we can see that kallsyms_addresses has shrunk by 16 bytes. (Note that kallsyms_num_syms is aligned to 8 bytes, so it could be 12 bytes... see the next data point below.)

It also appears that 3 symbols disappeared between .tmp_kallsyms1.S and .tmp_kallsyms2.S - get the diff of 'arm-linux-nm -n' output between .tmp_vmlinux1 and .tmp_vmlinux2 shows no fewer symbols. If that translates to 3 fewer addresses in the kallsyms_addresses table, that'd explain why its shrunk.

The question is... what are these three magically disappearing symbols and why have they disappeared? Are they related to the reshuffling of _etext and __end_rodata vs _data?

I've tried seeing if there's a change to our vmlinux.lds.S file that's caused this, but my only solution which so far has worked is to add a ". += 4;" after "_etext = .;" to force separation of _data from _etext. I'm not sure wasting 8K in this way is going to please many people though, so I wouldn't call it a solution.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
#4 lore raw

PATCH 1/1 Kallsyms problems (was: Re: linux-next: arm build failures)

Hi Russell,

Quoted 25 lines · On Fri, 19 Jun 2009 16:13:21 +0100 Russell King <[email protected]>…
Quoted 23 lines · Stephen Rothwell
Quoted 20 lines · On Wed, 17 Jun 2009 09:34:31 +0100 Catalin Marinas <[email protected]>…
Quoted 11 lines · Stephen Rothwell

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

I reported an error with kallsysms on ARM this Monday leading to inconsistent data:

http://lkml.org/lkml/2009/6/15/233

Could it be related?

Quoted 8 lines
Quoted 2 lines

Could be. I have added the proposed fix patch to my fixes tree until Linus or Sam gets around to including it.

No, I don't think it's got anything to do with it. It's the kallsyms generator that's getting confused.

What's happening is that we're ending up with differences between the symbolic information generated for .tmp_vmlinux2 and vmlinux:

I do wonder if the above could be the root cause, though. Since I added the added the fix mentioned above to linux-next, my arm builds have not failed do to this problem. Or maybe this "fix" just works around another problem?

In any case, it would be nice if the fix (repeated below) could be sent to Linus by someone (it also fixes a problem that Dave Miller is seeing).

Signature · 15 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/

From: Mike Frysinger <[email protected]>
Date: Mon, 15 Jun 2009 07:52:48 -0400
Subject: [PATCH] kallsyms: fix inverted valid symbol checking

The previous commit (17b1f0de) introduced a slightly broken consolidation
of the memory text range checking.

Signed-off-by: Mike Frysinger <[email protected]>
---
 scripts/kallsyms.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
scripts/kallsyms.c +3 -3
index 3cb5789..64343cc 100644
@@ -167,11 +167,11 @@ static int symbol_valid_tr(struct sym_entry *s)
 	for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
 		tr = &text_ranges[i];
 
-		if (s->addr >= tr->start && s->addr < tr->end)
-			return 0;
+		if (s->addr >= tr->start && s->addr <= tr->end)
+			return 1;
 	}
 
-	return 1;
+	return 0;
 }
 
 static int symbol_valid(struct sym_entry *s)
Signature · 1 line
1.6.3.1
#5 lore raw

Re: [PATCH] Kallsyms problems (was: Re: linux-next: arm build failures)

Quoted 37 lines · Stephen Rothwell

Hi Russell,

Quoted 25 lines · On Fri, 19 Jun 2009 16:13:21 +0100 Russell King <[email protected]>…
Quoted 23 lines · Stephen Rothwell
Quoted 20 lines · On Wed, 17 Jun 2009 09:34:31 +0100 Catalin Marinas <[email protected]>…
Quoted 11 lines · Stephen Rothwell

Over the past few days, I have started getting some arm configs (at least iop13xx_defconfig and integrator_defconfig, but some others) failing to build getting this error:

SYSMAP System.map
SYSMAP .tmp_System.map
Inconsistent kallsyms data
Try setting CONFIG_KALLSYMS_EXTRA_PASS

Is this something you have seen? Could it be my toolchain (I am currently using gcc 4.4.0 and have not changed it recently)?

I reported an error with kallsysms on ARM this Monday leading to inconsistent data:

http://lkml.org/lkml/2009/6/15/233

Could it be related?

Quoted 8 lines
Quoted 2 lines

Could be. I have added the proposed fix patch to my fixes tree until Linus or Sam gets around to including it.

No, I don't think it's got anything to do with it. It's the kallsyms generator that's getting confused.

What's happening is that we're ending up with differences between the symbolic information generated for .tmp_vmlinux2 and vmlinux:

Quoted 7 lines

I do wonder if the above could be the root cause, though. Since I added the added the fix mentioned above to linux-next, my arm builds have not failed do to this problem. Or maybe this "fix" just works around another problem?

In any case, it would be nice if the fix (repeated below) could be sent to Linus by someone (it also fixes a problem that Dave Miller is seeing).

Just sent it. Overloaded with day-time stuff (again).

Sam

#6 lore raw

Re: [PATCH] Kallsyms problems (was: Re: linux-next: arm build failures)

Quoted 1 line · Sam Ravnborg

Just sent it. Overloaded with day-time stuff (again).

Sam, thanks, it does appear to solve the problem here as well.

Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of: