Skip to contentSkip to conversation

Fix build failures with binutils 2.21

PATCH Applied Ben Hutchings 2 participants 7 messages Mar 9, 2011 – Apr 7, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover Fix build failures with binutils 2.21

gas has been silently ignoring .size directives with typos, but this was fixed in binutils 2.21, resulting in build failures with the new version.

I collected a couple of fixes for x86, then saw a similar failure on sparc and went hunting for more instances. This series, based on 2.6.38-rc8, should cover them all. However, my changes are not even build-tested.

Ben.

Alan Modra (1):
x86: Fix .size directive for async_page_fault

Ben Hutchings (3):
sparc: Fix .size directive for do_int_load
avr32: Fix .size directive for cpu_enter_idle
arm: Fix .size directives for __arm{7,9}tdmi_proc_info

H.J. Lu (1):
x86: Fix .size directive for xen_do_hypervisor_callback

 arch/arm/mm/proc-arm7tdmi.S            |    2 +-
 arch/arm/mm/proc-arm9tdmi.S            |    2 +-
 arch/avr32/mach-at32ap/pm-at32ap700x.S |    2 +-
 arch/sparc/kernel/una_asm_64.S         |    2 +-
 arch/x86/kernel/entry_32.S             |    2 +-
 arch/x86/kernel/entry_64.S             |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)
Signature · 10 lines
1.7.4.1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110309/ba24a4fd/attachment-0001.sig>
#1 lore raw

PATCH 1/5 x86: Fix .size directive for xen_do_hypervisor_callback

From: H.J. Lu <[email protected]>

[bwh: This is my summary.]

gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors.

---
If this is already headed to Linus by some other route, sorry for the dupe.

HJL: Care to add your S-o-b? (I can't believe this is even subject to copyright, so I'm signing it off myself anyway.)

Ben.

 arch/x86/kernel/entry_64.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/entry_64.S +1 -1
index aed1ffb..bbd5c80 100644
@@ -1248,7 +1248,7 @@ ENTRY(xen_do_hypervisor_callback)   # do_hypervisor_callback(struct *pt_regs)
 	decl PER_CPU_VAR(irq_count)
 	jmp  error_exit
 	CFI_ENDPROC
-END(do_hypervisor_callback)
+END(xen_do_hypervisor_callback)
 
 /*
  * Hypervisor uses this for application faults while it executes.
Signature · 1 line
1.7.4.1
#2 lore raw

PATCH 2/5 x86: Fix .size directive for async_page_fault

In reply to Ben Hutchings

From: Alan Modra <[email protected]>

[bwh: This is my summary.]

gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors.

---
If this is already headed to Linus by some other route, sorry for the dupe.

Alan: Care to add your S-o-b? (I can't believe this is even subject to copyright, so I'm signing it off myself anyway.)

Ben.

 arch/x86/kernel/entry_32.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/entry_32.S +1 -1
index c8b4efa..9ca3b0e 100644
@@ -1413,7 +1413,7 @@ ENTRY(async_page_fault)
 	CFI_ADJUST_CFA_OFFSET 4
 	jmp error_code
 	CFI_ENDPROC
-END(apf_page_fault)
+END(async_page_fault)
 #endif
 
 /*
Signature · 1 line
1.7.4.1
#3 lore raw

PATCH 4/5 avr32: Fix .size directive for cpu_enter_idle

In reply to Ben Hutchings

gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors.

---
 arch/avr32/mach-at32ap/pm-at32ap700x.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/avr32/mach-at32ap/pm-at32ap700x.S +1 -1
index 17503b0..f868f4c 100644
@@ -53,7 +53,7 @@ cpu_enter_idle:
 	st.w	r8[TI_flags], r9
 	unmask_interrupts
 	sleep	CPU_SLEEP_IDLE
-	.size	cpu_idle_sleep, . - cpu_idle_sleep
+	.size	cpu_enter_idle, . - cpu_enter_idle
 
 	/*
 	 * Common return path for PM functions that don't run from
Signature · 1 line
1.7.4.1
#5 lore raw

Re: [PATCH 4/5] avr32: Fix .size directive for cpu_enter_idle

In reply to Ben Hutchings
Quoted 3 lines · Ben Hutchings

gas used to accept (and ignore?) .size directives which referred to undefined symbols, as this does. In binutils 2.21 these are treated as errors.

Please acknowledge and send this upstream.

Ben.

Quoted 18 lines
---
 arch/avr32/mach-at32ap/pm-at32ap700x.S |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/avr32/mach-at32ap/pm-at32ap700x.S +1 -1
index 17503b0..f868f4c 100644
@@ -53,7 +53,7 @@ cpu_enter_idle:
 	st.w	r8[TI_flags], r9
 	unmask_interrupts
 	sleep	CPU_SLEEP_IDLE
-	.size	cpu_idle_sleep, . - cpu_idle_sleep
+	.size	cpu_enter_idle, . - cpu_enter_idle
 
 	/*
 	 * Common return path for PM functions that don't run from
Signature · 2 lines
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
#6 lore raw

PATCH 5/5 arm: Fix .size directives for __arm{7,9}tdmi_proc_info

In reply to Ben Hutchings

gas used to accept (and ignore?) .size directives which referred to undefined symbols, as these do. In binutils 2.21 these are treated as fatal errors.

---
 arch/arm/mm/proc-arm7tdmi.S |    2 +-
 arch/arm/mm/proc-arm9tdmi.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mm/proc-arm7tdmi.S +1 -1
index 0c9786d..50f8f7f 100644
@@ -143,7 +143,7 @@ __arm7tdmi_proc_info:
 		.long	0
 		.long	0
 		.long	v4_cache_fns
-		.size	__arm7tdmi_proc_info, . - __arm7dmi_proc_info
+		.size	__arm7tdmi_proc_info, . - __arm7tdmi_proc_info
 
 		.type	__triscenda7_proc_info, #object
 __triscenda7_proc_info:
arch/arm/mm/proc-arm9tdmi.S +1 -1
index db67e31..1de9d10 100644
@@ -113,7 +113,7 @@ __arm9tdmi_proc_info:
 		.long	0
 		.long	0
 		.long	v4_cache_fns
-		.size	__arm9tdmi_proc_info, . - __arm9dmi_proc_info
+		.size	__arm9tdmi_proc_info, . - __arm9tdmi_proc_info
 
 		.type	__p2001_proc_info, #object
 __p2001_proc_info:
Signature · 1 line
1.7.4.1