Do not emit __gnu_lto_v1 symbol.
2019-07-22 Martin Liska <mliska@suse.cz> * config/avr/avr.c (avr_asm_output_aligned_decl_common): Update comment. * toplev.c (compile_file): Do not emit __gnu_lto_v1 symbol. 2019-07-22 Martin Liska <mliska@suse.cz> * config/pa/stublib.c: Remove stub symbol __gnu_lto_v1. * config/pa/t-stublib: Likewise. 2019-07-22 Martin Liska <mliska@suse.cz> * simple-object-elf.c (simple_object_elf_copy_lto_debug_sections): Do not search for gnu_lto_v1, but search for first '\0'. From-SVN: r273662
This commit is contained in:
parent
d1caf05a89
commit
a861990d21
|
@ -1,3 +1,9 @@
|
||||||
|
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* config/avr/avr.c (avr_asm_output_aligned_decl_common): Update
|
||||||
|
comment.
|
||||||
|
* toplev.c (compile_file): Do not emit __gnu_lto_v1 symbol.
|
||||||
|
|
||||||
2019-07-22 Martin Liska <mliska@suse.cz>
|
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
* lto-section-in.c (lto_get_section_data):
|
* lto-section-in.c (lto_get_section_data):
|
||||||
|
|
|
@ -10163,7 +10163,7 @@ avr_asm_output_aligned_decl_common (FILE * stream,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* __gnu_lto_v1 etc. are just markers for the linker injected by toplev.c.
|
/* __gnu_lto_slim is just a marker for the linker injected by toplev.c.
|
||||||
There is no need to trigger __do_clear_bss code for them. */
|
There is no need to trigger __do_clear_bss code for them. */
|
||||||
|
|
||||||
if (!STR_PREFIX_P (name, "__gnu_lto"))
|
if (!STR_PREFIX_P (name, "__gnu_lto"))
|
||||||
|
|
21
gcc/toplev.c
21
gcc/toplev.c
|
@ -543,27 +543,6 @@ compile_file (void)
|
||||||
process_pending_assemble_externals ();
|
process_pending_assemble_externals ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Emit LTO marker if LTO info has been previously emitted. This is
|
|
||||||
used by collect2 to determine whether an object file contains IL.
|
|
||||||
We used to emit an undefined reference here, but this produces
|
|
||||||
link errors if an object file with IL is stored into a shared
|
|
||||||
library without invoking lto1. */
|
|
||||||
if (flag_generate_lto || flag_generate_offload)
|
|
||||||
{
|
|
||||||
#if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
|
|
||||||
ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
|
|
||||||
"__gnu_lto_v1",
|
|
||||||
HOST_WIDE_INT_1U, 8);
|
|
||||||
#elif defined ASM_OUTPUT_ALIGNED_COMMON
|
|
||||||
ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, "__gnu_lto_v1",
|
|
||||||
HOST_WIDE_INT_1U, 8);
|
|
||||||
#else
|
|
||||||
ASM_OUTPUT_COMMON (asm_out_file, "__gnu_lto_v1",
|
|
||||||
HOST_WIDE_INT_1U,
|
|
||||||
HOST_WIDE_INT_1U);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Let linker plugin know that this is a slim object and must be LTOed
|
/* Let linker plugin know that this is a slim object and must be LTOed
|
||||||
even when user did not ask for it. */
|
even when user did not ask for it. */
|
||||||
if (flag_generate_lto && !flag_fat_lto_objects)
|
if (flag_generate_lto && !flag_fat_lto_objects)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* config/pa/stublib.c: Remove stub symbol __gnu_lto_v1.
|
||||||
|
* config/pa/t-stublib: Likewise.
|
||||||
|
|
||||||
2019-07-22 Stafford Horne <shorne@gmail.com>
|
2019-07-22 Stafford Horne <shorne@gmail.com>
|
||||||
|
|
||||||
PR target/90362
|
PR target/90362
|
||||||
|
|
|
@ -115,7 +115,3 @@ pthread_once (void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef L_gnu_lto_v1
|
|
||||||
char gnu_lto_v1;
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -3,8 +3,7 @@ LIBGCCSTUB_OBJS = rfi-stub.o dfi-stub.o ritm-stub.o ditm-stub.o \
|
||||||
pthread_default_stacksize_np-stub.o \
|
pthread_default_stacksize_np-stub.o \
|
||||||
pthread_mutex_lock-stub.o \
|
pthread_mutex_lock-stub.o \
|
||||||
pthread_mutex_unlock-stub.o \
|
pthread_mutex_unlock-stub.o \
|
||||||
pthread_once-stub.o \
|
pthread_once-stub.o
|
||||||
gnu_lto_v1-stub.o
|
|
||||||
|
|
||||||
rfi-stub.o: $(srcdir)/config/pa/stublib.c
|
rfi-stub.o: $(srcdir)/config/pa/stublib.c
|
||||||
$(gcc_compile) -c -O2 -DL_register_frame_info $<
|
$(gcc_compile) -c -O2 -DL_register_frame_info $<
|
||||||
|
@ -36,9 +35,6 @@ pthread_mutex_unlock-stub.o: $(srcdir)/config/pa/stublib.c
|
||||||
pthread_once-stub.o: $(srcdir)/config/pa/stublib.c
|
pthread_once-stub.o: $(srcdir)/config/pa/stublib.c
|
||||||
$(gcc_compile) -c -O2 -DL_pthread_once $<
|
$(gcc_compile) -c -O2 -DL_pthread_once $<
|
||||||
|
|
||||||
gnu_lto_v1-stub.o: $(srcdir)/config/pa/stublib.c
|
|
||||||
$(gcc_compile) -c -O2 -DL_gnu_lto_v1 $<
|
|
||||||
|
|
||||||
libgcc_stub.a: $(LIBGCCSTUB_OBJS)
|
libgcc_stub.a: $(LIBGCCSTUB_OBJS)
|
||||||
-rm -rf $@
|
-rm -rf $@
|
||||||
$(AR) rc $@ $(LIBGCCSTUB_OBJS)
|
$(AR) rc $@ $(LIBGCCSTUB_OBJS)
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2019-07-22 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
|
||||||
|
Do not search for gnu_lto_v1, but search for first '\0'.
|
||||||
|
|
||||||
2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs>
|
2019-07-18 Eduard-Mihai Burtescu <eddyb@lyken.rs>
|
||||||
|
|
||||||
* cplus-dem.c: Include rust-demangle.h.
|
* cplus-dem.c: Include rust-demangle.h.
|
||||||
|
|
|
@ -1358,9 +1358,8 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
|
||||||
return errmsg;
|
return errmsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we are processing .symtab purge __gnu_lto_v1 and
|
/* If we are processing .symtab purge __gnu_lto_slim symbol
|
||||||
__gnu_lto_slim symbols from it and any symbols in discarded
|
from it and any symbols in discarded sections. */
|
||||||
sections. */
|
|
||||||
if (sh_type == SHT_SYMTAB)
|
if (sh_type == SHT_SYMTAB)
|
||||||
{
|
{
|
||||||
unsigned entsize = ELF_FETCH_FIELD (type_functions, ei_class, Shdr,
|
unsigned entsize = ELF_FETCH_FIELD (type_functions, ei_class, Shdr,
|
||||||
|
@ -1380,14 +1379,9 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
|
||||||
sobj->offset + stroff,
|
sobj->offset + stroff,
|
||||||
(unsigned char *)strings,
|
(unsigned char *)strings,
|
||||||
strsz, &errmsg, err);
|
strsz, &errmsg, err);
|
||||||
/* Find gnu_lto_ in strings. */
|
/* Find first '\0' in strings. */
|
||||||
while ((gnu_lto = (char *) memchr (gnu_lto, 'g',
|
gnu_lto = (char *) memchr (gnu_lto, '\0',
|
||||||
strings + strsz - gnu_lto)))
|
strings + strsz - gnu_lto + 1);
|
||||||
if (strncmp (gnu_lto, "gnu_lto_v1",
|
|
||||||
strings + strsz - gnu_lto) == 0)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
gnu_lto++;
|
|
||||||
/* Read the section index table if present. */
|
/* Read the section index table if present. */
|
||||||
if (symtab_indices_shndx[i - 1] != 0)
|
if (symtab_indices_shndx[i - 1] != 0)
|
||||||
{
|
{
|
||||||
|
@ -1461,7 +1455,6 @@ simple_object_elf_copy_lto_debug_sections (simple_object_read *sobj,
|
||||||
undefined and sharing the gnu_lto_ name. */
|
undefined and sharing the gnu_lto_ name. */
|
||||||
bind = STB_WEAK;
|
bind = STB_WEAK;
|
||||||
other = STV_HIDDEN;
|
other = STV_HIDDEN;
|
||||||
if (gnu_lto)
|
|
||||||
ELF_SET_FIELD (type_functions, ei_class, Sym,
|
ELF_SET_FIELD (type_functions, ei_class, Sym,
|
||||||
ent, st_name, Elf_Word,
|
ent, st_name, Elf_Word,
|
||||||
gnu_lto - strings);
|
gnu_lto - strings);
|
||||||
|
|
Loading…
Reference in New Issue