OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [target-reloc.h] - Diff between revs 163 and 166

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 163 Rev 166
Line 421... Line 421...
                 unsigned char* view,
                 unsigned char* view,
                 typename elfcpp::Elf_types<size>::Elf_Addr address,
                 typename elfcpp::Elf_types<size>::Elf_Addr address,
                 section_size_type view_size)
                 section_size_type view_size)
{
{
  // Construct the ELF relocation in a temporary buffer.
  // Construct the ELF relocation in a temporary buffer.
  const int reloc_size = elfcpp::Elf_sizes<64>::rela_size;
  const int reloc_size = elfcpp::Elf_sizes<size>::rela_size;
  unsigned char relbuf[reloc_size];
  unsigned char relbuf[reloc_size];
  elfcpp::Rela<64, false> rel(relbuf);
  elfcpp::Rela<size, big_endian> rel(relbuf);
  elfcpp::Rela_write<64, false> orel(relbuf);
  elfcpp::Rela_write<size, big_endian> orel(relbuf);
  orel.put_r_offset(r_offset);
  orel.put_r_offset(r_offset);
  orel.put_r_info(elfcpp::elf_r_info<64>(0, r_type));
  orel.put_r_info(elfcpp::elf_r_info<size>(0, r_type));
  orel.put_r_addend(r_addend);
  orel.put_r_addend(r_addend);
 
 
  // Setup a Symbol_value for the global symbol.
  // Setup a Symbol_value for the global symbol.
  const Sized_symbol<64>* sym = static_cast<const Sized_symbol<64>*>(gsym);
  const Sized_symbol<size>* sym = static_cast<const Sized_symbol<size>*>(gsym);
  Symbol_value<64> symval;
  Symbol_value<size> symval;
  gold_assert(sym->has_symtab_index() && sym->symtab_index() != -1U);
  gold_assert(sym->has_symtab_index() && sym->symtab_index() != -1U);
  symval.set_output_symtab_index(sym->symtab_index());
  symval.set_output_symtab_index(sym->symtab_index());
  symval.set_output_value(sym->value());
  symval.set_output_value(sym->value());
  if (gsym->type() == elfcpp::STT_TLS)
  if (gsym->type() == elfcpp::STT_TLS)
    symval.set_is_tls_symbol();
    symval.set_is_tls_symbol();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.