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

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [sparc.cc] - Diff between revs 163 and 166

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

Rev 163 Rev 166
Line 1996... Line 1996...
                shndx = object->adjust_sym_shndx(r_sym, shndx, &is_ordinary);
                shndx = object->adjust_sym_shndx(r_sym, shndx, &is_ordinary);
                if (!is_ordinary)
                if (!is_ordinary)
                  object->error(_("local symbol %u has bad shndx %u"),
                  object->error(_("local symbol %u has bad shndx %u"),
                                r_sym, shndx);
                                r_sym, shndx);
                else
                else
                  got->add_local_pair_with_rela(object, r_sym,
                  got->add_local_pair_with_rel(object, r_sym,
                                                lsym.get_st_shndx(),
                                                lsym.get_st_shndx(),
                                                GOT_TYPE_TLS_PAIR,
                                                GOT_TYPE_TLS_PAIR,
                                                target->rela_dyn_section(layout),
                                                target->rela_dyn_section(layout),
                                                (size == 64
                                                (size == 64
                                                 ? elfcpp::R_SPARC_TLS_DTPMOD64
                                                 ? elfcpp::R_SPARC_TLS_DTPMOD64
Line 2337... Line 2337...
            // dynamic relocation for it.
            // dynamic relocation for it.
            Reloc_section* rela_dyn = target->rela_dyn_section(layout);
            Reloc_section* rela_dyn = target->rela_dyn_section(layout);
            if (gsym->is_from_dynobj()
            if (gsym->is_from_dynobj()
                || gsym->is_undefined()
                || gsym->is_undefined()
                || gsym->is_preemptible())
                || gsym->is_preemptible())
              got->add_global_with_rela(gsym, GOT_TYPE_STANDARD, rela_dyn,
              got->add_global_with_rel(gsym, GOT_TYPE_STANDARD, rela_dyn,
                                        elfcpp::R_SPARC_GLOB_DAT);
                                        elfcpp::R_SPARC_GLOB_DAT);
            else if (!gsym->has_got_offset(GOT_TYPE_STANDARD))
            else if (!gsym->has_got_offset(GOT_TYPE_STANDARD))
              {
              {
                unsigned int off = got->add_constant(0);
                unsigned int off = got->add_constant(0);
 
 
Line 2387... Line 2387...
              {
              {
                // Create a pair of GOT entries for the module index and
                // Create a pair of GOT entries for the module index and
                // dtv-relative offset.
                // dtv-relative offset.
                Output_data_got<size, big_endian>* got
                Output_data_got<size, big_endian>* got
                    = target->got_section(symtab, layout);
                    = target->got_section(symtab, layout);
                got->add_global_pair_with_rela(gsym, GOT_TYPE_TLS_PAIR,
                got->add_global_pair_with_rel(gsym, GOT_TYPE_TLS_PAIR,
                                               target->rela_dyn_section(layout),
                                               target->rela_dyn_section(layout),
                                               (size == 64 ?
                                              (size == 64
                                                elfcpp::R_SPARC_TLS_DTPMOD64 :
                                               ? elfcpp::R_SPARC_TLS_DTPMOD64
                                                elfcpp::R_SPARC_TLS_DTPMOD32),
                                               : elfcpp::R_SPARC_TLS_DTPMOD32),
                                               (size == 64 ?
                                              (size == 64
                                                elfcpp::R_SPARC_TLS_DTPOFF64 :
                                               ? elfcpp::R_SPARC_TLS_DTPOFF64
                                                elfcpp::R_SPARC_TLS_DTPOFF32));
                                               : elfcpp::R_SPARC_TLS_DTPOFF32));
 
 
                // Emit R_SPARC_WPLT30 against "__tls_get_addr"
                // Emit R_SPARC_WPLT30 against "__tls_get_addr"
                if (r_type == elfcpp::R_SPARC_TLS_GD_CALL)
                if (r_type == elfcpp::R_SPARC_TLS_GD_CALL)
                  generate_tls_call(symtab, layout, target);
                  generate_tls_call(symtab, layout, target);
              }
              }
            else if (optimized_type == tls::TLSOPT_TO_IE)
            else if (optimized_type == tls::TLSOPT_TO_IE)
              {
              {
                // Create a GOT entry for the tp-relative offset.
                // Create a GOT entry for the tp-relative offset.
                Output_data_got<size, big_endian>* got
                Output_data_got<size, big_endian>* got
                    = target->got_section(symtab, layout);
                    = target->got_section(symtab, layout);
                got->add_global_with_rela(gsym, GOT_TYPE_TLS_OFFSET,
                got->add_global_with_rel(gsym, GOT_TYPE_TLS_OFFSET,
                                          target->rela_dyn_section(layout),
                                          target->rela_dyn_section(layout),
                                          (size == 64 ?
                                          (size == 64 ?
                                           elfcpp::R_SPARC_TLS_TPOFF64 :
                                           elfcpp::R_SPARC_TLS_TPOFF64 :
                                           elfcpp::R_SPARC_TLS_TPOFF32));
                                           elfcpp::R_SPARC_TLS_TPOFF32));
              }
              }
Line 2460... Line 2460...
            if (optimized_type == tls::TLSOPT_NONE)
            if (optimized_type == tls::TLSOPT_NONE)
              {
              {
                // Create a GOT entry for the tp-relative offset.
                // Create a GOT entry for the tp-relative offset.
                Output_data_got<size, big_endian>* got
                Output_data_got<size, big_endian>* got
                  = target->got_section(symtab, layout);
                  = target->got_section(symtab, layout);
                got->add_global_with_rela(gsym, GOT_TYPE_TLS_OFFSET,
                got->add_global_with_rel(gsym, GOT_TYPE_TLS_OFFSET,
                                          target->rela_dyn_section(layout),
                                          target->rela_dyn_section(layout),
                                          (size == 64 ?
                                         (size == 64
                                           elfcpp::R_SPARC_TLS_TPOFF64 :
                                          ? elfcpp::R_SPARC_TLS_TPOFF64
                                           elfcpp::R_SPARC_TLS_TPOFF32));
                                          : elfcpp::R_SPARC_TLS_TPOFF32));
              }
              }
            else if (optimized_type != tls::TLSOPT_TO_LE)
            else if (optimized_type != tls::TLSOPT_TO_LE)
              unsupported_reloc_global(object, r_type, gsym);
              unsupported_reloc_global(object, r_type, gsym);
            break;
            break;
          }
          }

powered by: WebSVN 2.1.0

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