aboutsummaryrefslogtreecommitdiffstats
path: root/main/libdrm/fix-symbol-checks.patch
blob: 67e9868f0f9cb685f53468c1e5ac327ae2e87874 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
index c5b85b5..c943282 100755
--- a/amdgpu/amdgpu-symbol-check
+++ b/amdgpu/amdgpu-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_amdgpuinclude_HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '{print $3}' | while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_amdgpu.so} | awk '$2 == "T" {print $3}' | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 amdgpu_bo_alloc
diff --git a/etnaviv/etnaviv-symbol-check b/etnaviv/etnaviv-symbol-check
index 0e2030e..3c32352 100755
--- a/etnaviv/etnaviv-symbol-check
+++ b/etnaviv/etnaviv-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_ETNAVIV_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_etnaviv.so} | awk '$2 = "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 etna_device_new
diff --git a/exynos/exynos-symbol-check b/exynos/exynos-symbol-check
index 9692caa..2ab794e 100755
--- a/exynos/exynos-symbol-check
+++ b/exynos/exynos-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_exynos*_HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_exynos.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 exynos_bo_create
diff --git a/freedreno/freedreno-symbol-check b/freedreno/freedreno-symbol-check
index 42f2c43..51de69c 100755
--- a/freedreno/freedreno-symbol-check
+++ b/freedreno/freedreno-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_FREEDRENO_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_freedreno.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 fd_bo_cpu_fini
diff --git a/intel/intel-symbol-check b/intel/intel-symbol-check
index 2aa2d81..21d951a 100755
--- a/intel/intel-symbol-check
+++ b/intel/intel-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_INTEL_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '{print $3}' | while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_intel.so} | awk '$2 == "T" {print $3}' | while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 drm_intel_bo_alloc
diff --git a/libkms/kms-symbol-check b/libkms/kms-symbol-check
index 658b269..e55963e 100755
--- a/libkms/kms-symbol-check
+++ b/libkms/kms-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBKMS_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libkms.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 kms_bo_create
diff --git a/nouveau/nouveau-symbol-check b/nouveau/nouveau-symbol-check
index b265cea..4417e99 100755
--- a/nouveau/nouveau-symbol-check
+++ b/nouveau/nouveau-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_NOUVEAU_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_nouveau.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 nouveau_bo_map
diff --git a/omap/omap-symbol-check b/omap/omap-symbol-check
index 759c84b..7ea96bb 100755
--- a/omap/omap-symbol-check
+++ b/omap/omap-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.am/libdrm_omap*HEADERS
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_omap.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 omap_bo_cpu_fini
diff --git a/radeon/radeon-symbol-check b/radeon/radeon-symbol-check
index 0bf2ffc..35e3ea1 100755
--- a/radeon/radeon-symbol-check
+++ b/radeon/radeon-symbol-check
@@ -1,13 +1,10 @@
-#!/bin/bash
+#!/bin/sh
 
-# The following symbols (past the first five) are taken from the public headers.
+# The following symbols (past the first two) are taken from the public headers.
 # A list of the latter should be available Makefile.sources/LIBDRM_RADEON_H_FILES
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_radeon.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_start
-_edata
-_end
 _fini
 _init
 radeon_bo_debug
diff --git a/tegra/tegra-symbol-check b/tegra/tegra-symbol-check
index 420469f..4c7094e 100755
--- a/tegra/tegra-symbol-check
+++ b/tegra/tegra-symbol-check
@@ -1,16 +1,9 @@
-#!/bin/bash
+#!/bin/sh
 
 # The following symbols (past the first nine) are taken from tegra.h.
 
-FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '{print $3}'| while read func; do
+FUNCS=$(nm -D --format=bsd --defined-only ${1-.libs/libdrm_tegra.so} | awk '$2 == "T" {print $3}'| while read func; do
 ( grep -q "^$func$" || echo $func )  <<EOF
-__bss_end__
-__bss_start__
-__bss_start
-__end__
-_bss_end__
-_edata
-_end
 _fini
 _init
 drm_tegra_bo_get_flags