diff options
author | Eugene Tarassov | 2020-01-21 18:58:16 +0000 |
---|---|---|
committer | Eugene Tarassov | 2020-01-21 18:58:16 +0000 |
commit | 5f8a0cfaf3284d6db8770d6331647241da099cd0 (patch) | |
tree | e5e14b1f14975ded466998f567eb4c4d4c7e0c43 /agent | |
parent | b1e5e39847162260a836dc0ae038a0c571db34b2 (diff) | |
download | org.eclipse.tcf.agent-5f8a0cfaf3284d6db8770d6331647241da099cd0.tar.gz org.eclipse.tcf.agent-5f8a0cfaf3284d6db8770d6331647241da099cd0.tar.xz org.eclipse.tcf.agent-5f8a0cfaf3284d6db8770d6331647241da099cd0.zip |
Bug 559349 - a workaround for the bug in the binutils RISC-V port
Diffstat (limited to 'agent')
-rw-r--r-- | agent/tcf/services/tcf_elf.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/agent/tcf/services/tcf_elf.c b/agent/tcf/services/tcf_elf.c index de39a541..d1453965 100644 --- a/agent/tcf/services/tcf_elf.c +++ b/agent/tcf/services/tcf_elf.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007-2018 Wind River Systems, Inc. and others. + * Copyright (c) 2007-2020 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this distribution. @@ -2156,6 +2156,17 @@ static void create_symbol_addr_search_index(ELF_Section * sec) { int add = 0; U8_T addr = 0; U1_T type = 0; + + /* this is a workaround for the extra relocs for local symbols in the binutils RISC-V port */ + if (file->machine == EM_RISCV && file->type == ET_REL) { + ELF_SymbolInfo sym_info = {0}; + unpack_elf_symbol_info(tbl, n, &sym_info); + if (sym_info.name && sym_info.name[0] == '.' && sym_info.name[1] == 'L') { + n++; + continue; + } + } + if (file->machine == EM_PPC64) { ELF_SymbolInfo sym_info; unpack_elf_symbol_info(tbl, n, &sym_info); |