diff options
author | Gabe Black <gabeblack@google.com> | 2018-06-22 14:15:28 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-05 06:00:58 +0000 |
commit | 97018a3b20c129a3413011d205f18189dd1a75c9 (patch) | |
tree | 2fcad74bfdd46403f35773090fce30cc13da0d56 /tests/test-progs/asmtest/src | |
parent | 642fa515b822aca10839e0382e3a5d94eca20dd2 (diff) | |
download | gem5-97018a3b20c129a3413011d205f18189dd1a75c9.tar.xz |
systemc: Get sc_main to work even when dynamically linked.
Unfortunately multiply defined weak symbols don't work like they're
supposed to when the different versions are across dynamic linking
boundaries.
Fortunately, a weak symbol with no definition at all will still
consistently evaluate as 0, and a singularly defined weak symbol will
still resolve correctly.
Instead of relying on a weak version of sc_main being overridden by a
strong/non-default definition, this change leaves it as undefined and
detects at run time whether the symbol resolves to 0 or to an actual
code location.
Change-Id: I31c4ff769b0c52277c6cf4845ca3f85000009583
Reviewed-on: https://gem5-review.googlesource.com/11610
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'tests/test-progs/asmtest/src')
0 files changed, 0 insertions, 0 deletions