Skip to contentSkip to conversation

xen: fix reloc.S generation

PATCH In review Christoph Egger 2 participants 3 messages Mar 31, 2011 – Apr 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: fix reloc.S generation

Hi,

attached patch fixes generation of reloc.S and makes xen boot out-of-the box since c/s 19146.
The output of AT&T UNIX and GNU od(1) are different.

Please apply this to Xen 4.1, 4.0 and 3.4.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
xen/arch/x86/boot/build32.mk +2 -2
diff -r cebd5d3f0ec4 xen/arch/x86/boot/build32.mk
@@ -9,8 +9,8 @@ CFLAGS := $(filter-out -flto,$(CFLAGS))
 
 # NB. awk invocation is a portable alternative to 'head -n -1'
 %.S: %.bin
-	(od -v -t x $< | awk 'NR > 1 {print s} {s=$$0}' | \
-	sed 's/ /,0x/g' | sed 's/^[0-9]*,/ .long /') >$@
+	(od -v -t x $< | tr -s ' ' | awk 'NR > 1 {print s} {s=$$0}' | \
+	sed 's/ /,0x/g' | sed 's/,0x$$//' | sed 's/^[0-9]*,/ .long /') >$@
 
 %.bin: %.lnk
 	$(OBJCOPY) -O binary $< $@

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Christoph Egger writes ("[Xen-devel] [PATCH] xen: fix reloc.S generation"):

Quoted 3 lines

attached patch fixes generation of reloc.S and makes xen boot out-of-the box since c/s 19146.
The output of AT&T UNIX and GNU od(1) are different.

Which (if any) of these versions of od is correct ? The SuSv3 specification of od is quite comprehensive so it should be possible to contrive a rune which doesn't need subsequent seddery. Could you try to do so ?

Thanks,
Ian.

#2 lore raw
Quoted 9 lines · Ian Jackson

Christoph Egger writes ("[Xen-devel] [PATCH] xen: fix reloc.S generation"):

Quoted 3 lines

attached patch fixes generation of reloc.S and makes xen boot out-of-the box since c/s 19146.
The output of AT&T UNIX and GNU od(1) are different.

Which (if any) of these versions of od is correct ? The SuSv3 specification of od is quite comprehensive so it should be possible to contrive a rune which doesn't need subsequent seddery. Could you try to do so ?

http://pubs.opengroup.org/onlinepubs/009695399/utilities/od.html

says

"and the output from each of the transformations shall be separated by one or more <blank>s."

So both AT&T UNIX and GNU od(1) behaviours are correct and we have to deal with that. => Please apply the patch to -unstable, 4.1-testing, 4.0-testing and 3.4-testing.

Thanks,
Christoph

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632