Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 114008 | Differences between
and this patch

Collapse All | Expand All

(-)binutils-2.25/bfd/elf-bfd.h (+13 lines)
Lines 197-202 Link Here
197
  /* Symbol is a unique global symbol.  */
197
  /* Symbol is a unique global symbol.  */
198
  unsigned int unique_global : 1;
198
  unsigned int unique_global : 1;
199
199
200
  /* FIXME: these 2 bits consume another 4 bytes.  */
201
  /* Symbol is concrete, ie. non-vague if we can detect that, from the
202
     .direct section.  */
203
  unsigned int concrete_ref : 1;
204
  /* Symbol is certainly vague (if we can detect that), from the
205
     .direct section.  */
206
  unsigned int vague_ref : 1;
207
200
  /* String table index in .dynstr if this is a dynamic symbol.  */
208
  /* String table index in .dynstr if this is a dynamic symbol.  */
201
  unsigned long dynstr_index;
209
  unsigned long dynstr_index;
202
210
Lines 522-527 Link Here
522
  asection *tls_sec;
530
  asection *tls_sec;
523
  bfd_size_type tls_size;
531
  bfd_size_type tls_size;
524
532
533
  /* Direct linkage output section.  */
534
  asection *direct_sec;
535
525
  /* A linked list of BFD's loaded in the link.  */
536
  /* A linked list of BFD's loaded in the link.  */
526
  struct elf_link_loaded_list *loaded;
537
  struct elf_link_loaded_list *loaded;
527
538
Lines 1611-1616 Link Here
1611
     name actually used, which will be the DT_SONAME entry if there is
1622
     name actually used, which will be the DT_SONAME entry if there is
1612
     one.  */
1623
     one.  */
1613
  const char *dt_name;
1624
  const char *dt_name;
1625
  int         dt_needed_idx;
1614
1626
1615
  /* The linker emulation needs to know what audit libs
1627
  /* The linker emulation needs to know what audit libs
1616
     are used by a dynamic object.  */
1628
     are used by a dynamic object.  */
Lines 1726-1731 Link Here
1726
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
1738
#define elf_local_got_offsets(bfd) (elf_tdata(bfd) -> local_got.offsets)
1727
#define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents)
1739
#define elf_local_got_ents(bfd) (elf_tdata(bfd) -> local_got.ents)
1728
#define elf_dt_name(bfd)	(elf_tdata(bfd) -> dt_name)
1740
#define elf_dt_name(bfd)	(elf_tdata(bfd) -> dt_name)
1741
#define elf_dt_needed_idx(bfd)	(elf_tdata(bfd) -> dt_needed_idx)
1729
#define elf_dt_audit(bfd)	(elf_tdata(bfd) -> dt_audit)
1742
#define elf_dt_audit(bfd)	(elf_tdata(bfd) -> dt_audit)
1730
#define elf_dyn_lib_class(bfd)	(elf_tdata(bfd) -> dyn_lib_class)
1743
#define elf_dyn_lib_class(bfd)	(elf_tdata(bfd) -> dyn_lib_class)
1731
#define elf_bad_symtab(bfd)	(elf_tdata(bfd) -> bad_symtab)
1744
#define elf_bad_symtab(bfd)	(elf_tdata(bfd) -> bad_symtab)
(-)binutils-2.25/bfd/elf.c (+1 lines)
Lines 1331-1336 Link Here
1331
	    case DT_RELCOUNT: name = "RELCOUNT"; break;
1331
	    case DT_RELCOUNT: name = "RELCOUNT"; break;
1332
	    case DT_FLAGS_1: name = "FLAGS_1"; break;
1332
	    case DT_FLAGS_1: name = "FLAGS_1"; break;
1333
	    case DT_VERSYM: name = "VERSYM"; break;
1333
	    case DT_VERSYM: name = "VERSYM"; break;
1334
	    case DT_SUSE_DIRECT: name = "SUSE_DIRECT"; break;
1334
	    case DT_VERDEF: name = "VERDEF"; break;
1335
	    case DT_VERDEF: name = "VERDEF"; break;
1335
	    case DT_VERDEFNUM: name = "VERDEFNUM"; break;
1336
	    case DT_VERDEFNUM: name = "VERDEFNUM"; break;
1336
	    case DT_VERNEED: name = "VERNEED"; break;
1337
	    case DT_VERNEED: name = "VERNEED"; break;
(-)binutils-2.25/bfd/elflink.c (+111 lines)
Lines 221-226 Link Here
221
	return FALSE;
221
	return FALSE;
222
    }
222
    }
223
223
224
  if ( info->direct && !info->executable )
225
    {
226
      s = bfd_make_section (abfd, ".suse.direct");
227
      if (s == NULL
228
	  || ! bfd_set_section_flags (abfd, s, flags | SEC_READONLY)
229
	  || ! bfd_set_section_alignment (abfd, s, 2))
230
	return FALSE;
231
      elf_hash_table (info)->direct_sec = s;
232
    }
233
224
  /* Create sections to hold version informations.  These are removed
234
  /* Create sections to hold version informations.  These are removed
225
     if they are not needed.  */
235
     if they are not needed.  */
226
  s = bfd_make_section_anyway_with_flags (abfd, ".gnu.version_d",
236
  s = bfd_make_section_anyway_with_flags (abfd, ".gnu.version_d",
Lines 3085-3090 Link Here
3085
3095
3086
      if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
3096
      if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex))
3087
	return -1;
3097
	return -1;
3098
      elf_dt_needed_idx (abfd) = ++(info->dt_needed_index);
3088
    }
3099
    }
3089
  else
3100
  else
3090
    /* We were just checking for existence of the tag.  */
3101
    /* We were just checking for existence of the tag.  */
Lines 3338-3343 Link Here
3338
  bfd_boolean add_needed;
3349
  bfd_boolean add_needed;
3339
  struct elf_link_hash_table *htab;
3350
  struct elf_link_hash_table *htab;
3340
  bfd_size_type amt;
3351
  bfd_size_type amt;
3352
  asection *direct_sec;
3353
  unsigned char *direct_data;
3341
  void *alloc_mark = NULL;
3354
  void *alloc_mark = NULL;
3342
  struct bfd_hash_entry **old_table = NULL;
3355
  struct bfd_hash_entry **old_table = NULL;
3343
  unsigned int old_size = 0;
3356
  unsigned int old_size = 0;
Lines 3355-3360 Link Here
3355
  htab = elf_hash_table (info);
3368
  htab = elf_hash_table (info);
3356
  bed = get_elf_backend_data (abfd);
3369
  bed = get_elf_backend_data (abfd);
3357
3370
3371
  direct_sec = NULL;
3372
  direct_data = NULL;
3373
3358
  if ((abfd->flags & DYNAMIC) == 0)
3374
  if ((abfd->flags & DYNAMIC) == 0)
3359
    dynamic = FALSE;
3375
    dynamic = FALSE;
3360
  else
3376
  else
Lines 3374-3379 Link Here
3374
	    bfd_set_error (bfd_error_wrong_format);
3390
	    bfd_set_error (bfd_error_wrong_format);
3375
	  goto error_return;
3391
	  goto error_return;
3376
	}
3392
	}
3393
      if (info->direct)
3394
	  direct_sec = bfd_get_section_by_name (abfd, ".suse.direct");
3395
      if (direct_sec != NULL)
3396
        {
3397
	  direct_data = bfd_alloc (abfd, direct_sec->size);
3398
	  if (direct_data == NULL
3399
	      || ! bfd_get_section_contents (abfd, direct_sec,
3400
					     direct_data, 0, direct_sec->size))
3401
	    goto error_return;
3402
	}
3377
    }
3403
    }
3378
3404
3379
  ehdr = elf_elfheader (abfd);
3405
  ehdr = elf_elfheader (abfd);
Lines 4115-4120 Link Here
4115
	      && vernum > 1
4141
	      && vernum > 1
4116
	      && definition)
4142
	      && definition)
4117
	    h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];
4143
	    h->verinfo.verdef = &elf_tdata (abfd)->verdef[vernum - 1];
4144
4145
        if (direct_sec != NULL)
4146
          {
4147
            unsigned long d_idx = isym - isymbuf;
4148
            unsigned long direct_entry;
4149
            d_idx += extsymoff;
4150
            d_idx *= 2;
4151
             BFD_ASSERT (d_idx <= bfd_get_section_size (direct_sec));
4152
            direct_entry = bfd_get_16 (abfd, direct_data + d_idx);
4153
            if ((direct_entry & DT_SUSE_DIRECT_VAGUE) != 0)
4154
              h->vague_ref = 1;
4155
            if (!h->vague_ref
4156
                 && (direct_entry & DT_SUSE_DIRECT_MASK) !=
4157
                                      DT_SUSE_DIRECT_UNKNOWN)
4158
              h->concrete_ref = 1;
4159
          }
4160
4118
	}
4161
	}
4119
4162
4120
      if (! (_bfd_generic_link_add_one_symbol
4163
      if (! (_bfd_generic_link_add_one_symbol
Lines 4885-4890 Link Here
4885
  if (isymbuf != NULL)
4928
  if (isymbuf != NULL)
4886
    free (isymbuf);
4929
    free (isymbuf);
4887
 error_return:
4930
 error_return:
4931
  if (direct_data != NULL)
4932
    free (direct_data);
4888
  return FALSE;
4933
  return FALSE;
4889
}
4934
}
4890
4935
Lines 6402-6407 Link Here
6402
	    return FALSE;
6447
	    return FALSE;
6403
	}
6448
	}
6404
6449
6450
      /* Create the direct bindings section - 1 entry per dynsym.  */
6451
      s = bfd_get_section_by_name (dynobj, ".suse.direct");
6452
      if (s != NULL)
6453
        {
6454
  	  if (dynsymcount == 0)
6455
            s->flags |= SEC_EXCLUDE;
6456
	  else
6457
	    {
6458
	      s->size = dynsymcount * sizeof (Elf_External_Direct);
6459
	      s->contents = bfd_zalloc (output_bfd, s->size);
6460
	      if (s->contents == NULL)
6461
	        return FALSE;
6462
	      memset (s->contents, 0xff, s->size);
6463
	      if (!_bfd_elf_add_dynamic_entry (info, DT_SUSE_DIRECT, 0))
6464
	        return FALSE;
6465
	    }
6466
	}
6467
6405
      /* Set the size of the .dynsym and .hash sections.  We counted
6468
      /* Set the size of the .dynsym and .hash sections.  We counted
6406
	 the number of dynamic symbols in elf_link_add_object_symbols.
6469
	 the number of dynamic symbols in elf_link_add_object_symbols.
6407
	 We will build the contents of .dynsym and .hash when we build
6470
	 We will build the contents of .dynsym and .hash when we build
Lines 6869-6874 Link Here
6869
6932
6870
  table->root.type = bfd_link_elf_hash_table;
6933
  table->root.type = bfd_link_elf_hash_table;
6871
  table->hash_table_id = target_id;
6934
  table->hash_table_id = target_id;
6935
  table->direct_sec = NULL;
6872
6936
6873
  return ret;
6937
  return ret;
6874
}
6938
}
Lines 7424-7429 Link Here
7424
  asection *hash_sec;
7488
  asection *hash_sec;
7425
  /* symbol version section (.gnu.version).  */
7489
  /* symbol version section (.gnu.version).  */
7426
  asection *symver_sec;
7490
  asection *symver_sec;
7491
  /* .direct linkage section.  */
7492
  asection *direct_sec;
7427
  /* Buffer large enough to hold contents of any section.  */
7493
  /* Buffer large enough to hold contents of any section.  */
7428
  bfd_byte *contents;
7494
  bfd_byte *contents;
7429
  /* Buffer large enough to hold external relocs of any section.  */
7495
  /* Buffer large enough to hold external relocs of any section.  */
Lines 8703-8708 Link Here
8703
8769
8704
	  eoinfo->file_sym_done = TRUE;
8770
	  eoinfo->file_sym_done = TRUE;
8705
	}
8771
	}
8772
8773
      if (finfo->direct_sec != NULL)
8774
	{
8775
	  int dt_index = DT_SUSE_DIRECT_UNKNOWN;
8776
	  bfd_vma offset = 2 * h->dynindx;
8777
         BFD_ASSERT (offset <= finfo->direct_sec->size);
8778
8779
	  if ((h->root.type == bfd_link_hash_defined
8780
	       || h->root.type == bfd_link_hash_defweak)
8781
	      && h->root.u.def.section != NULL
8782
	      && h->root.u.def.section->owner != NULL)
8783
	    {
8784
	      asection *sec = h->root.u.def.section;
8785
8786
	      dt_index = elf_dt_needed_idx (sec->owner);
8787
8788
	      if ((sec->owner->flags & DYNAMIC) == 0)
8789
		{
8790
		  if (sec->name == NULL
8791
		      || strncmp (sec->name, ".gnu.linkonce",
8792
			          sizeof ".gnu.linkonce" - 1) == 0)
8793
		    dt_index |= DT_SUSE_DIRECT_VAGUE;
8794
8795
		  /* app -> library data references get turned into copy
8796
		     relocs, so objects can migrate unpredictably into the
8797
		     application itself.  */
8798
		  else if (h->type == STT_OBJECT)
8799
		    dt_index |= DT_SUSE_DIRECT_VAGUE;
8800
		}
8801
	      else if (h->vague_ref)
8802
		dt_index |= DT_SUSE_DIRECT_VAGUE;
8803
8804
	      else if (!h->concrete_ref)
8805
		dt_index = DT_SUSE_DIRECT_UNKNOWN;
8806
8807
	    }
8808
	  bfd_put_16 (finfo->output_bfd,
8809
		      dt_index,
8810
		      finfo->direct_sec->contents + offset);
8811
	}
8706
    }
8812
    }
8707
  else
8813
  else
8708
    {
8814
    {
Lines 10511-10516 Link Here
10511
10617
10512
  if (! dynamic)
10618
  if (! dynamic)
10513
    {
10619
    {
10620
      finfo.direct_sec = NULL;
10514
      flinfo.dynsym_sec = NULL;
10621
      flinfo.dynsym_sec = NULL;
10515
      flinfo.hash_sec = NULL;
10622
      flinfo.hash_sec = NULL;
10516
      flinfo.symver_sec = NULL;
10623
      flinfo.symver_sec = NULL;
Lines 10518-10523 Link Here
10518
    }
10625
    }
10519
  else
10626
  else
10520
    {
10627
    {
10628
      finfo.direct_sec = bfd_get_section_by_name (dynobj, ".suse.direct");
10521
      flinfo.dynsym_sec = bfd_get_linker_section (dynobj, ".dynsym");
10629
      flinfo.dynsym_sec = bfd_get_linker_section (dynobj, ".dynsym");
10522
      flinfo.hash_sec = bfd_get_linker_section (dynobj, ".hash");
10630
      flinfo.hash_sec = bfd_get_linker_section (dynobj, ".hash");
10523
      /* Note that dynsym_sec can be NULL (on VMS).  */
10631
      /* Note that dynsym_sec can be NULL (on VMS).  */
Lines 11350-11355 Link Here
11350
	    case DT_VERNEED:
11458
	    case DT_VERNEED:
11351
	      name = ".gnu.version_r";
11459
	      name = ".gnu.version_r";
11352
	      goto get_vma;
11460
	      goto get_vma;
11461
	    case DT_SUSE_DIRECT:
11462
	      name = ".suse.direct";
11463
	      goto get_vma;
11353
	    case DT_VERSYM:
11464
	    case DT_VERSYM:
11354
	      name = ".gnu.version";
11465
	      name = ".gnu.version";
11355
	    get_vma:
11466
	    get_vma:
(-)binutils-2.25/binutils/readelf.c (-1 / +138 lines)
Lines 194-199 Link Here
194
static int do_syms;
194
static int do_syms;
195
static int do_dyn_syms;
195
static int do_dyn_syms;
196
static int do_reloc;
196
static int do_reloc;
197
static int do_direct;
197
static int do_sections;
198
static int do_sections;
198
static int do_section_groups;
199
static int do_section_groups;
199
static int do_section_details;
200
static int do_section_details;
Lines 1877-1882 Link Here
1877
    case DT_SYMINFO:	return "SYMINFO"; /* aka ADDRRNGHI */
1878
    case DT_SYMINFO:	return "SYMINFO"; /* aka ADDRRNGHI */
1878
1879
1879
    case DT_VERSYM:	return "VERSYM";
1880
    case DT_VERSYM:	return "VERSYM";
1881
    case DT_SUSE_DIRECT:	return "SUSE_DIRECT";
1880
1882
1881
    case DT_TLSDESC_GOT: return "TLSDESC_GOT";
1883
    case DT_TLSDESC_GOT: return "TLSDESC_GOT";
1882
    case DT_TLSDESC_PLT: return "TLSDESC_PLT";
1884
    case DT_TLSDESC_PLT: return "TLSDESC_PLT";
Lines 3722-3727 Link Here
3722
  {"syms",	       no_argument, 0, 's'},
3724
  {"syms",	       no_argument, 0, 's'},
3723
  {"dyn-syms",	       no_argument, 0, OPTION_DYN_SYMS},
3725
  {"dyn-syms",	       no_argument, 0, OPTION_DYN_SYMS},
3724
  {"relocs",	       no_argument, 0, 'r'},
3726
  {"relocs",	       no_argument, 0, 'r'},
3727
  {"direct",	       no_argument, 0, 'y'},
3725
  {"notes",	       no_argument, 0, 'n'},
3728
  {"notes",	       no_argument, 0, 'n'},
3726
  {"dynamic",	       no_argument, 0, 'd'},
3729
  {"dynamic",	       no_argument, 0, 'd'},
3727
  {"arch-specific",    no_argument, 0, 'A'},
3730
  {"arch-specific",    no_argument, 0, 'A'},
Lines 3767-3772 Link Here
3767
  --dyn-syms             Display the dynamic symbol table\n\
3770
  --dyn-syms             Display the dynamic symbol table\n\
3768
  -n --notes             Display the core notes (if present)\n\
3771
  -n --notes             Display the core notes (if present)\n\
3769
  -r --relocs            Display the relocations (if present)\n\
3772
  -r --relocs            Display the relocations (if present)\n\
3773
  -y --direct            Display direct linkage table (if present)\n\
3770
  -u --unwind            Display the unwind info (if present)\n\
3774
  -u --unwind            Display the unwind info (if present)\n\
3771
  -d --dynamic           Display the dynamic section (if present)\n\
3775
  -d --dynamic           Display the dynamic section (if present)\n\
3772
  -V --version-info      Display the version sections (if present)\n\
3776
  -V --version-info      Display the version sections (if present)\n\
Lines 3889-3895 Link Here
3889
    usage (stderr);
3893
    usage (stderr);
3890
3894
3891
  while ((c = getopt_long
3895
  while ((c = getopt_long
3892
	  (argc, argv, "ADHINR:SVWacdeghi:lnp:rstuvw::x:", options, NULL)) != EOF)
3896
	  (argc, argv, "ADHINR:SVWacdeyghi:lnp:rstuvw::x:", options, NULL)) != EOF)
3893
    {
3897
    {
3894
      switch (c)
3898
      switch (c)
3895
	{
3899
	{
Lines 3903-3908 Link Here
3903
	case 'a':
3907
	case 'a':
3904
	  do_syms++;
3908
	  do_syms++;
3905
	  do_reloc++;
3909
	  do_reloc++;
3910
	  do_direct++;
3906
	  do_unwind++;
3911
	  do_unwind++;
3907
	  do_dynamic++;
3912
	  do_dynamic++;
3908
	  do_header++;
3913
	  do_header++;
Lines 3936-3941 Link Here
3936
	case 'r':
3941
	case 'r':
3937
	  do_reloc++;
3942
	  do_reloc++;
3938
	  break;
3943
	  break;
3944
	case 'y':
3945
	  do_direct++;
3946
	  break;
3939
	case 'u':
3947
	case 'u':
3940
	  do_unwind++;
3948
	  do_unwind++;
3941
	  break;
3949
	  break;
Lines 4042-4047 Link Here
4042
      && !do_segments && !do_header && !do_dump && !do_version
4050
      && !do_segments && !do_header && !do_dump && !do_version
4043
      && !do_histogram && !do_debugging && !do_arch && !do_notes
4051
      && !do_histogram && !do_debugging && !do_arch && !do_notes
4044
      && !do_section_groups && !do_archive_index
4052
      && !do_section_groups && !do_archive_index
4053
      && !do_direct
4045
      && !do_dyn_syms)
4054
      && !do_dyn_syms)
4046
    usage (stderr);
4055
    usage (stderr);
4047
  else if (argc < 3)
4056
  else if (argc < 3)
Lines 6192-6197 Link Here
6192
  return 1;
6201
  return 1;
6193
}
6202
}
6194
6203
6204
static void
6205
print_dt_needed_name (int idx)
6206
{
6207
  const char *name = NULL;
6208
  Elf_Internal_Dyn *entry;
6209
6210
  idx &= DT_SUSE_DIRECT_MASK;
6211
 
6212
  switch (idx)
6213
    {
6214
    case 0:
6215
      name = _("<self>");
6216
      break;
6217
    case DT_SUSE_DIRECT_UNKNOWN:
6218
      name = _("<unknown>");
6219
      break;
6220
    default:
6221
      idx--;
6222
6223
      for (entry = dynamic_section;
6224
	   entry < dynamic_section + dynamic_nent && idx > 0;
6225
	   entry++)
6226
	if (entry->d_tag == DT_NEEDED)
6227
	  idx--;
6228
  
6229
      if (idx == 0)
6230
        {
6231
          if (VALID_DYNAMIC_NAME (entry->d_un.d_val))
6232
	    name = GET_DYNAMIC_NAME (entry->d_un.d_val);
6233
	  else
6234
	    name = NULL;
6235
	}
6236
      break;
6237
    }
6238
6239
  if (!name)
6240
    name = _("<out-of-range>");
6241
  if (do_wide)
6242
    printf ("%s", name);
6243
  else
6244
    printf ("%-25s", name);
6245
}
6246
6247
static int
6248
process_direct (FILE *file)
6249
{
6250
  unsigned int i;
6251
  unsigned int si;
6252
  char *strtab;
6253
  unsigned char *directtab;
6254
  Elf_Internal_Sym *symtab = NULL;
6255
  Elf_Internal_Sym *psym;
6256
  Elf_Internal_Shdr *direct = NULL;
6257
  Elf_Internal_Shdr *dynsym = NULL;
6258
  Elf_Internal_Shdr *section;
6259
6260
  if (!do_direct)
6261
    return 1;
6262
  if (!dynamic_symbols || !dynamic_section || !dynamic_strings)
6263
    return 1;
6264
6265
  for (i = 0, section = section_headers;
6266
       i < elf_header.e_shnum;
6267
       i++, section++)
6268
    {
6269
      if (section->sh_type == SHT_DYNSYM)
6270
        dynsym = section;
6271
      if (!strcmp (SECTION_NAME (section), ".suse.direct"))
6272
        direct = section;
6273
    }
6274
  if (!dynsym || !direct)
6275
    return 1;
6276
  
6277
  symtab = GET_ELF_SYMBOLS (file, dynsym);
6278
  if (!symtab)
6279
    return 1;
6280
6281
  directtab = get_data (NULL, file, direct->sh_offset,
6282
			direct->sh_size, 1, _("direct linkage table"));
6283
  if (!symtab)
6284
  {
6285
    free (symtab);
6286
    return 1;
6287
  }
6288
6289
  if (dynsym->sh_link == elf_header.e_shstrndx)
6290
    strtab = string_table;
6291
  else
6292
    {
6293
      Elf_Internal_Shdr *string_sec;
6294
6295
      string_sec = SECTION_HEADER (dynsym->sh_link);
6296
6297
      strtab = get_data (NULL, file, string_sec->sh_offset,
6298
			 string_sec->sh_size, 1, _("string table"));
6299
    }
6300
6301
  assert (strtab != NULL);
6302
6303
  printf (_("\nDirect relocations for image:\n"));
6304
  printf (_("   Num:  Index     Vague   Binding                    Symbol\n"));
6305
  for (si = 0, psym = symtab;
6306
       si < dynsym->sh_size / dynsym->sh_entsize;
6307
       si++, psym++)
6308
    {
6309
       unsigned int field;
6310
       printf ("%6d: ", si);
6311
       field = byte_get (directtab + (si * 2), 2);
6312
       printf ("[0x%.4x]   ", field);
6313
       printf ("%s", (field & DT_SUSE_DIRECT_VAGUE) ? "Vague" : "     ");
6314
       printf ("  ");
6315
       print_dt_needed_name (field);
6316
       printf ("  ");
6317
       print_symbol (25, strtab + psym->st_name);
6318
       printf ("\n");
6319
    }
6320
6321
6322
  free (symtab);
6323
  if (strtab != string_table)
6324
    free (strtab);
6325
6326
  return 1;
6327
}
6328
6329
6195
/* Process the unwind section.  */
6330
/* Process the unwind section.  */
6196
6331
6197
#include "unwind-ia64.h"
6332
#include "unwind-ia64.h"
Lines 14981-14986 Link Here
14981
15116
14982
  process_relocs (file);
15117
  process_relocs (file);
14983
15118
15119
  process_direct (file);
15120
14984
  process_unwind (file);
15121
  process_unwind (file);
14985
15122
14986
  process_symbol_table (file);
15123
  process_symbol_table (file);
(-)binutils-2.25/include/bfdlink.h (+6 lines)
Lines 277-282 Link Here
277
     Setting this true may result in a non-sharable text segment.  */
277
     Setting this true may result in a non-sharable text segment.  */
278
  unsigned int nocopyreloc: 1;
278
  unsigned int nocopyreloc: 1;
279
279
280
  /* TRUE if BFD should bind symbols directly to resolved at link time.  */
281
  unsigned int direct: 1;
282
280
  /* TRUE if BFD should export all symbols in the dynamic symbol table
283
  /* TRUE if BFD should export all symbols in the dynamic symbol table
281
     of an executable, rather than only those used.  */
284
     of an executable, rather than only those used.  */
282
  unsigned int export_dynamic: 1;
285
  unsigned int export_dynamic: 1;
Lines 528-533 Link Here
528
     is explicitly requested by the user, -1 if enabled by default.  */
531
     is explicitly requested by the user, -1 if enabled by default.  */
529
  int pei386_runtime_pseudo_reloc;
532
  int pei386_runtime_pseudo_reloc;
530
533
534
  /* current max dtinfo section number.  */
535
  int dt_needed_index;
536
531
  /* How many spare .dynamic DT_NULL entries should be added?  */
537
  /* How many spare .dynamic DT_NULL entries should be added?  */
532
  unsigned int spare_dynamic_tags;
538
  unsigned int spare_dynamic_tags;
533
539
(-)binutils-2.25/include/elf/common.h (+5 lines)
Lines 862-867 Link Here
862
#define DF_BIND_NOW	(1 << 3)
862
#define DF_BIND_NOW	(1 << 3)
863
#define DF_STATIC_TLS	(1 << 4)
863
#define DF_STATIC_TLS	(1 << 4)
864
864
865
/* Constants for the DT_DIRECT entries.  */
866
#define DT_SUSE_DIRECT_VAGUE   (1<<15)
867
#define DT_SUSE_DIRECT_MASK     0xfff
868
#define DT_SUSE_DIRECT_UNKNOWN  DT_SUSE_DIRECT_MASK
869
865
/* These constants are used for the version number of a Elf32_Verdef
870
/* These constants are used for the version number of a Elf32_Verdef
866
   structure.  */
871
   structure.  */
867
872
(-)binutils-2.25/include/elf/external.h (+4 lines)
Lines 225-230 Link Here
225
  unsigned char		vd_next[4];
225
  unsigned char		vd_next[4];
226
} Elf_External_Verdef;
226
} Elf_External_Verdef;
227
227
228
typedef struct {
229
  unsigned char		dir_libidx[2];
230
} Elf_External_Direct;
231
228
/* This structure appears in a SHT_GNU_verdef section.  */
232
/* This structure appears in a SHT_GNU_verdef section.  */
229
233
230
typedef struct {
234
typedef struct {
(-)binutils-2.25/ld/ldlex.h (+1 lines)
Lines 32-37 Link Here
32
  OPTION_CREF,
32
  OPTION_CREF,
33
  OPTION_DEFSYM,
33
  OPTION_DEFSYM,
34
  OPTION_DEMANGLE,
34
  OPTION_DEMANGLE,
35
  OPTION_DIRECT,
35
  OPTION_DYNAMIC_LINKER,
36
  OPTION_DYNAMIC_LINKER,
36
  OPTION_SYSROOT,
37
  OPTION_SYSROOT,
37
  OPTION_EB,
38
  OPTION_EB,
(-)binutils-2.25/ld/lexsup.c (+5 lines)
Lines 277-282 Link Here
277
    '\0', NULL, N_("Bind global references locally"), ONE_DASH },
277
    '\0', NULL, N_("Bind global references locally"), ONE_DASH },
278
  { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
278
  { {"Bsymbolic-functions", no_argument, NULL, OPTION_SYMBOLIC_FUNCTIONS},
279
    '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
279
    '\0', NULL, N_("Bind global function references locally"), ONE_DASH },
280
  { {"Bdirect", no_argument, NULL, OPTION_DIRECT},
281
    '\0', NULL, N_("Direct-linkage the the shared libraries"), TWO_DASHES },
280
  { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
282
  { {"check-sections", no_argument, NULL, OPTION_CHECK_SECTIONS},
281
    '\0', NULL, N_("Check section addresses for overlaps (default)"),
283
    '\0', NULL, N_("Check section addresses for overlaps (default)"),
282
    TWO_DASHES },
284
    TWO_DASHES },
Lines 746-751 Link Here
746
	      cplus_demangle_set_style (style);
748
	      cplus_demangle_set_style (style);
747
	    }
749
	    }
748
	  break;
750
	  break;
751
	case OPTION_DIRECT:
752
	  link_info.direct = TRUE;
753
	  break;
749
	case 'I':		/* Used on Solaris.  */
754
	case 'I':		/* Used on Solaris.  */
750
	case OPTION_DYNAMIC_LINKER:
755
	case OPTION_DYNAMIC_LINKER:
751
	  command_line.interpreter = optarg;
756
	  command_line.interpreter = optarg;

Return to bug 114008