diff options
author | Sean Keys <skeys@ipdatasys.com> | 2012-06-28 21:36:35 +0000 |
---|---|---|
committer | Sean Keys <skeys@ipdatasys.com> | 2012-06-28 21:36:35 +0000 |
commit | fe540416272cd7791a82793a395a4cb65f9fce16 (patch) | |
tree | 0cd41e84d87ff1cd0d031a0eb42ee150318e234d /gas/config/tc-xgate.c | |
parent | a743abeb908daaecb24afa7be5f418ce6f228439 (diff) | |
download | gdb-fe540416272cd7791a82793a395a4cb65f9fce16.zip gdb-fe540416272cd7791a82793a395a4cb65f9fce16.tar.gz gdb-fe540416272cd7791a82793a395a4cb65f9fce16.tar.bz2 |
gas/config/
* tc-xgate.h: Defined tc_frob_symbol.
* tc-xgate.c (xgate_frob_symbol): Wrote new function to mark
symbols as being XGATE by setting st_target_internal value.
bfd/
* elf32-xgate.c (elf32_xgate_add_symbol_hook): Added a temp patch
that forces st_target_internal to equal 1, since tc_frob_symbol
seems to need adjusting.
Diffstat (limited to 'gas/config/tc-xgate.c')
-rw-r--r-- | gas/config/tc-xgate.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gas/config/tc-xgate.c b/gas/config/tc-xgate.c index 29089c9..84bac42 100644 --- a/gas/config/tc-xgate.c +++ b/gas/config/tc-xgate.c @@ -1410,3 +1410,24 @@ xgate_find_match (struct xgate_opcode_handle *opcode_handle, return NULL; } + +/* Because we are dealing with two different core that view the system + memory with different offsets, we must differentiate what core a + symbol belongs to, in order for the linker to cross-link. */ + +int +xgate_frob_symbol (symbolS *sym) +{ + asymbol *bfdsym; + elf_symbol_type *elfsym; + + bfdsym = symbol_get_bfdsym (sym); + elfsym = elf_symbol_from (bfd_asymbol_bfd (bfdsym), bfdsym); + + gas_assert(elfsym); + + /* Mark the symbol as being *from XGATE */ + elfsym->internal_elf_sym.st_target_internal = 1; + + return 0; +} |