Improve TLS valriable r/w on ELF shared-libary

since calling __tls_get_addr performace is too bad, we should r/w TLS variables with special offset
users can turn on this feature with ESCARGOT_ENABLE_TLS_ACCESS_BY_ADDRESS flag

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2025-05-13 13:41:38 +09:00 committed by MuHong Byun
commit 2c0c041c9a
68 changed files with 385 additions and 284 deletions

View file

@ -1012,7 +1012,7 @@ void CodeCacheReader::loadByteCodeStream(Context* context, ByteCodeBlock* block)
switch (info.relocType) {
case ByteCodeRelocType::RELOC_STRING: {
if (UNLIKELY(dataIndex == SIZE_MAX)) {
bc->m_value = String::emptyString;
bc->m_value = String::emptyString();
} else {
ASSERT(dataIndex < stringLiteralData.size());
String* string = stringLiteralData[dataIndex];
@ -1135,7 +1135,7 @@ void CodeCacheReader::loadByteCodeStream(Context* context, ByteCodeBlock* block)
bodyStringForLoadRegExp = false;
} else {
if (info.dataOffset == SIZE_MAX) {
bc->m_option = String::emptyString;
bc->m_option = String::emptyString();
} else {
ASSERT(info.dataOffset < stringLiteralData.size());
bc->m_option = stringLiteralData[info.dataOffset];