aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2021-01-11 11:56:54 -0800
committerFangrui Song <maskray@google.com>2021-01-11 12:03:36 -0800
commit87d583c6e8cd0e49f64da76636ebeec033298b4d (patch)
tree0db4d141573b5454d054767ac407e32e7e6bfc9c /scripts
parentbf7db6d369d7366ffe3ebcf3c2810139b0195517 (diff)
downloadglibc-87d583c6e8cd0e49f64da76636ebeec033298b4d.zip
glibc-87d583c6e8cd0e49f64da76636ebeec033298b4d.tar.gz
glibc-87d583c6e8cd0e49f64da76636ebeec033298b4d.tar.bz2
install: Replace scripts/output-format.sed with objdump -f [BZ #26559]
GNU ld and gold have supported --print-output-format since 2011. glibc requires binutils>=2.25 (2015), so if LD is GNU ld or gold, we can assume the option is supported. lld is by default a cross linker supporting multiple targets. It auto detects the file format and does not need OUTPUT_FORMAT. It does not support --print-output-format. By parsing objdump -f, we can support all the three linkers. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/output-format.sed35
1 files changed, 0 insertions, 35 deletions
diff --git a/scripts/output-format.sed b/scripts/output-format.sed
deleted file mode 100644
index 364f520..0000000
--- a/scripts/output-format.sed
+++ /dev/null
@@ -1,35 +0,0 @@
-/ld.*[ ]-E[BL]/b f
-/collect.*[ ]-E[BL]/b f
-/OUTPUT_FORMAT[^)]*$/{N
-s/\n[ ]*/ /
-}
-t o
-: o
-s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
-t q
-s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\1,\2,\3/
-t s
-s/^.*OUTPUT_FORMAT(\([^,)]*\).*$)/OUTPUT_FORMAT(\1)/
-t q
-d
-: s
-s/"//g
-G
-s/\n//
-s/^\([^,]*\),\([^,]*\),\([^,]*\),B/OUTPUT_FORMAT(\2)/p
-s/^\([^,]*\),\([^,]*\),\([^,]*\),L/OUTPUT_FORMAT(\3)/p
-s/^\([^,]*\),\([^,]*\),\([^,]*\)/OUTPUT_FORMAT(\1)/p
-/,/s|^|*** BUG in libc/scripts/output-format.sed *** |p
-q
-: q
-s/"//g
-p
-q
-: f
-s/^.*[ ]-E\([BL]\)[ ].*$/,\1/
-t h
-s/^.*[ ]-E\([BL]\)$/,\1/
-t h
-d
-: h
-h