aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-05-13 15:04:17 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-05-15 08:40:21 +0000
commit717a2ae128505f94bd0133192c42bec48a6c9f09 (patch)
tree833811621090e10aab055270e573cda127d9e9ff
parentb1e3440e596b632e09c48ef88ada6a5224628720 (diff)
downloadmeson-717a2ae128505f94bd0133192c42bec48a6c9f09.zip
meson-717a2ae128505f94bd0133192c42bec48a6c9f09.tar.gz
meson-717a2ae128505f94bd0133192c42bec48a6c9f09.tar.bz2
symbolextractor: Do not store the size of code objects
This will almost always change and cause a relink of everything. Our other symbol extractor implementations do not store this either. We only need to store the size of data objects, since that necessitates a relink due to copy relocations. Drastically reduces the amount of relinking required in gstreamer and gtk on Linux.
-rw-r--r--mesonbuild/scripts/symbolextractor.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py
index d393f93..66161e2 100644
--- a/mesonbuild/scripts/symbolextractor.py
+++ b/mesonbuild/scripts/symbolextractor.py
@@ -113,7 +113,10 @@ def gnu_syms(libfilename: str, outfilename: str):
continue
line_split = line.split()
entry = line_split[0:2]
- if len(line_split) >= 4:
+ # Store the size of symbols pointing to data objects so we relink
+ # when those change, which is needed because of copy relocations
+ # https://github.com/mesonbuild/meson/pull/7132#issuecomment-628353702
+ if line_split[1].upper() in ('B', 'G', 'D') and len(line_split) >= 4:
entry += [line_split[3]]
result += [' '.join(entry)]
write_if_changed('\n'.join(result) + '\n', outfilename)