diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-05-13 15:04:17 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2020-05-15 11:11:59 +0530 |
commit | 1a9d67500cc1565d55bb3c3834a443c4e44532e2 (patch) | |
tree | 6bdc0c0bb649804ad455896bc14a654843aa3dcc | |
parent | f2d0551941d4131b8a5b9d3320b27d1333b24034 (diff) | |
download | meson-nirbheek/symbol-extractor-linux-code-size.tar.gz |
symbolextractor: Do not store the size of code objectsnirbheek/symbol-extractor-linux-code-size
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.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/scripts/symbolextractor.py b/mesonbuild/scripts/symbolextractor.py index d393f933e..66161e27e 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) |