A limitation on the new powerpc (32-bit) use of secure PLT instead of bss PLT?

Mark Millard via freebsd-ppc <[email protected]>
Newsgroups gmane.os.freebsd.devel.ppc
Message-ID <[email protected]>
Looking around I ran into from a .../binutils-2_25_1/bfd/elf32-ppc.c :

	  /* Profiling of shared libs (and pies) is not supported with
	     secure plt, because ppc32 does profiling before a
	     function prologue and a secure plt pic call stubs needs
	     r30 to be set up.  */

A little more context for this in ppc_elf_select_plt_layout is:

  if (htab->plt_type == PLT_UNSET)
    {
      struct elf_link_hash_entry *h;
      if (htab->params->plt_style == PLT_OLD)
	htab->plt_type = PLT_OLD;
      else if (info->shared
	       && htab->elf.dynamic_sections_created
	       && (h = elf_link_hash_lookup (&htab->elf, "_mcount",
					     FALSE, FALSE, TRUE)) != NULL
	       && (h->type == STT_FUNC
		   || h->needs_plt)
	       && h->ref_regular
	       && !(SYMBOL_CALLS_LOCAL (info, h)
		    || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
			&& h->root.type == bfd_link_hash_undefweak)))
	{
	  /* Profiling of shared libs (and pies) is not supported with
	     secure plt, because ppc32 does profiling before a
	     function prologue and a secure plt pic call stubs needs
	     r30 to be set up.  */
	  htab->plt_type = PLT_OLD;
	}
      else
. . .



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.