linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] powerpc/wrapper: Output linker map file
  2020-03-27 18:12 [PATCH 0/3] powerpc: Minor updates to improve build debugging Geoff Levand
  2020-03-27 18:12 ` [PATCH 1/3] powerpc/head_check: Automatic verbosity Geoff Levand
@ 2020-03-27 18:12 ` Geoff Levand
  2020-03-27 18:12 ` [PATCH 3/3] powerpc/head_check: Avoid broken pipe Geoff Levand
  2 siblings, 0 replies; 4+ messages in thread
From: Geoff Levand @ 2020-03-27 18:12 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

To aid debugging wrapper troubles, output a linker map file
'wrapper.map' when the build is verbose.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/boot/wrapper | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ed6266367bc0..35ace40d9fc2 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -29,6 +29,7 @@ set -e
 # Allow for verbose output
 if [ "$V" = 1 ]; then
     set -x
+    map="-Map wrapper.map"
 fi
 
 # defaults
@@ -500,7 +501,7 @@ if [ "$platform" != "miboot" ]; then
         text_start="-Ttext $link_address"
     fi
 #link everything
-    ${CROSS}ld -m $format -T $lds $text_start $pie $nodl -o "$ofile" \
+    ${CROSS}ld -m $format -T $lds $text_start $pie $nodl -o "$ofile" $map \
 	$platformo $tmp $object/wrapper.a
     rm $tmp
 fi
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] powerpc/head_check: Avoid broken pipe
  2020-03-27 18:12 [PATCH 0/3] powerpc: Minor updates to improve build debugging Geoff Levand
  2020-03-27 18:12 ` [PATCH 1/3] powerpc/head_check: Automatic verbosity Geoff Levand
  2020-03-27 18:12 ` [PATCH 2/3] powerpc/wrapper: Output linker map file Geoff Levand
@ 2020-03-27 18:12 ` Geoff Levand
  2 siblings, 0 replies; 4+ messages in thread
From: Geoff Levand @ 2020-03-27 18:12 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Remove the '-m4' option to grep to allow grep to process all of nm's
output.  This avoids the nm warning:

  nm terminated with signal 13 [Broken pipe]

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/tools/head_check.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/tools/head_check.sh b/arch/powerpc/tools/head_check.sh
index 37061fb9b58e..e32d3162e5ed 100644
--- a/arch/powerpc/tools/head_check.sh
+++ b/arch/powerpc/tools/head_check.sh
@@ -46,7 +46,7 @@ nm="$1"
 vmlinux="$2"
 
 # gcc-4.6-era toolchain make _stext an A (absolute) symbol rather than T
-$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" -m4 > .tmp_symbols.txt
+$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" > .tmp_symbols.txt
 
 
 vma=$(cat .tmp_symbols.txt | grep -e " [TA] _stext$" | cut -d' ' -f1)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 0/3] powerpc: Minor updates to improve build debugging
@ 2020-03-27 18:12 Geoff Levand
  2020-03-27 18:12 ` [PATCH 1/3] powerpc/head_check: Automatic verbosity Geoff Levand
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Geoff Levand @ 2020-03-27 18:12 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

Hi Michael,

Here are a few minor updates to the powerpc build files that make debugging
build problems a little easier.  Please consider.

-Geoff

The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e:

  Linux 5.6-rc7 (2020-03-22 18:31:56 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-powerpc

for you to fetch changes up to e6fb89a0946dd620f1d8120578744942ca934e11:

  powerpc/head_check: Avoid broken pipe (2020-03-27 09:41:41 -0700)

----------------------------------------------------------------
Geoff Levand (3):
      powerpc/head_check: Automatic verbosity
      powerpc/wrapper: Output linker map file
      powerpc/head_check: Avoid broken pipe

 arch/powerpc/boot/wrapper        | 3 ++-
 arch/powerpc/tools/head_check.sh | 8 +++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] powerpc/head_check: Automatic verbosity
  2020-03-27 18:12 [PATCH 0/3] powerpc: Minor updates to improve build debugging Geoff Levand
@ 2020-03-27 18:12 ` Geoff Levand
  2020-03-27 18:12 ` [PATCH 2/3] powerpc/wrapper: Output linker map file Geoff Levand
  2020-03-27 18:12 ` [PATCH 3/3] powerpc/head_check: Avoid broken pipe Geoff Levand
  2 siblings, 0 replies; 4+ messages in thread
From: Geoff Levand @ 2020-03-27 18:12 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

To aid debugging build problems turn on shell tracing for the
head_check script when the build is verbose.

Signed-off-by: Geoff Levand <geoff@infradead.org>
---
 arch/powerpc/tools/head_check.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/tools/head_check.sh b/arch/powerpc/tools/head_check.sh
index ad9e57209aa4..37061fb9b58e 100644
--- a/arch/powerpc/tools/head_check.sh
+++ b/arch/powerpc/tools/head_check.sh
@@ -31,8 +31,10 @@
 # level entry code (boot, interrupt vectors, etc) until r2 is set up. This
 # could cause the kernel to die in early boot.
 
-# Turn this on if you want more debug output:
-# set -x
+# Allow for verbose output
+if [ "$V" = "1" ]; then
+	set -x
+fi
 
 if [ $# -lt 2 ]; then
 	echo "$0 [path to nm] [path to vmlinux]" 1>&2
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-27 18:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-27 18:12 [PATCH 0/3] powerpc: Minor updates to improve build debugging Geoff Levand
2020-03-27 18:12 ` [PATCH 1/3] powerpc/head_check: Automatic verbosity Geoff Levand
2020-03-27 18:12 ` [PATCH 2/3] powerpc/wrapper: Output linker map file Geoff Levand
2020-03-27 18:12 ` [PATCH 3/3] powerpc/head_check: Avoid broken pipe Geoff Levand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).