aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-12-17 11:15:08 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-12-17 11:15:08 +0100
commit17273b73d6d9e1d7ff475f698d167a9e313bba4d (patch)
tree213b6ca1d12735b3de14a06ada1cf6bc88c976af /sys
parent2b31345f36a04f232a5f698a6dc19e8123f204ab (diff)
sys/syz-extract: don't redefine __asm__ in ELF mode
This is not necessary since we build legit object file for the target binary now. But this breaks mips with: /linux/arch/mips/include/asm/thread_info.h:53:30: error: register name not specified for ‘__current_thread_info’ register struct thread_info *__current_thread_info __asm__("$28"); So just remove the old hack. Follow up to #1536
Diffstat (limited to 'sys')
-rw-r--r--sys/syz-extract/fetch.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/syz-extract/fetch.go b/sys/syz-extract/fetch.go
index 405b0167f..9b09477fb 100644
--- a/sys/syz-extract/fetch.go
+++ b/sys/syz-extract/fetch.go
@@ -172,7 +172,9 @@ func extractFromELF(binFile string) ([]uint64, error) {
}
var srcTemplate = template.Must(template.New("").Parse(`
+{{if not .ExtractFromELF}}
#define __asm__(...)
+{{end}}
{{if .DefineGlibcUse}}
#ifndef __GLIBC_USE