ld/
[deliverable/binutils-gdb.git] / ld / emultempl / elf32.em
index 251c5110823147e9b121c8c5b168aca6b65bb5aa..682f5e53934f641b1a8fe13af7adf1a2fec4821b 100644 (file)
@@ -893,13 +893,11 @@ if test x"$LDEMUL_AFTER_OPEN" != xgld"$EMULATION_NAME"_after_open; then
 fragment <<EOF
 
 static bfd_size_type
-id_note_section_size (bfd *abfd)
+id_note_section_size (bfd *abfd ATTRIBUTE_UNUSED)
 {
   const char *style = emit_note_gnu_build_id;
   bfd_size_type size;
 
-  abfd = abfd;
-
   size = offsetof (Elf_External_Note, name[sizeof "GNU"]);
   size = (size + 3) & -(bfd_size_type) 4;
 
@@ -1487,6 +1485,13 @@ gld${EMULATION_NAME}_before_allocation (void)
     {
       _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
 
+      /* Make __ehdr_start hidden if it has been referenced, to
+        prevent the symbol from being dynamic.  */
+      if (!bfd_elf_record_link_assignment (link_info.output_bfd, &link_info,
+                                          "__ehdr_start", TRUE, TRUE))
+       einfo ("%P%F: failed to record assignment to %s: %E\n",
+              "__ehdr_start");
+
       /* If we are going to make any variable assignments, we need to
         let the ELF backend know about them in case the variables are
         referred to by dynamic objects.  */
This page took 0.023974 seconds and 4 git commands to generate.