aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.in
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-12 16:50:34 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-12 16:50:52 -0700
commit3355cb3b643bd50aafae768e7cf990d4bec40fe1 (patch)
treec16b986fd942a0b25ab494d5635d97d5fdd5de62 /ld/Makefile.in
parent8ddd5a6cd692ca8c4041d9fb64cbb4e0585d4aa1 (diff)
downloadgdb-3355cb3b643bd50aafae768e7cf990d4bec40fe1.zip
gdb-3355cb3b643bd50aafae768e7cf990d4bec40fe1.tar.gz
gdb-3355cb3b643bd50aafae768e7cf990d4bec40fe1.tar.bz2
Handle symbols defined/referenced only within IR
The plugin is called to claim symbols in an archive element from plugin_object_p. But those symbols aren't needed to create output. They are defined and referenced only within IR. get_symbols should return resolution based on IR symbol kinds. PR ld/20070 * Makefile.am (noinst_LTLIBRARIES): Add libldtestplug4.la. (libldtestplug4_la_SOURCES): New. (libldtestplug4_la_CFLAGS): Likewise. (libldtestplug4_la_LDFLAGS): Likewise. * Makefile.in: Regenerated. * plugin.c (get_symbols): Return resolution based on IR symbol kinds for symbols defined/referenced only within IR. * testplug4.c: New file. * ld/testsuite/ld-plugin/pr20070.d: Likewise. * ld/testsuite/ld-plugin/pr20070a.c: Likewise. * ld/testsuite/ld-plugin/pr20070b.c: Likewise. * testsuite/ld-plugin/plugin.exp (plugin4_name): New. (plugin4_path): Likewise. Add a test for ld/20070.
Diffstat (limited to 'ld/Makefile.in')
-rw-r--r--ld/Makefile.in30
1 files changed, 27 insertions, 3 deletions
diff --git a/ld/Makefile.in b/ld/Makefile.in
index fc9d4bb..37e9e2f 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -135,6 +135,15 @@ libldtestplug3_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(libldtestplug3_la_CFLAGS) $(CFLAGS) \
$(libldtestplug3_la_LDFLAGS) $(LDFLAGS) -o $@
@ENABLE_PLUGINS_TRUE@am_libldtestplug3_la_rpath =
+libldtestplug4_la_LIBADD =
+@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_OBJECTS = \
+@ENABLE_PLUGINS_TRUE@ libldtestplug4_la-testplug4.lo
+libldtestplug4_la_OBJECTS = $(am_libldtestplug4_la_OBJECTS)
+libldtestplug4_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(libldtestplug4_la_CFLAGS) $(CFLAGS) \
+ $(libldtestplug4_la_LDFLAGS) $(LDFLAGS) -o $@
+@ENABLE_PLUGINS_TRUE@am_libldtestplug4_la_rpath =
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" \
"$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
@@ -170,8 +179,8 @@ YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
LTYACCCOMPILE = $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
SOURCES = $(libldtestplug_la_SOURCES) $(libldtestplug2_la_SOURCES) \
- $(libldtestplug3_la_SOURCES) $(ld_new_SOURCES) \
- $(EXTRA_ld_new_SOURCES)
+ $(libldtestplug3_la_SOURCES) $(libldtestplug4_la_SOURCES) \
+ $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES)
INFO_DEPS = ld.info
am__TEXINFO_TEX_DIR = $(srcdir)/../texinfo
DVIS = ld.dvi
@@ -970,7 +979,9 @@ ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $
#
# Build a dummy plugin using libtool.
#
-@ENABLE_PLUGINS_TRUE@noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la libldtestplug3.la
+@ENABLE_PLUGINS_TRUE@noinst_LTLIBRARIES = libldtestplug.la libldtestplug2.la \
+@ENABLE_PLUGINS_TRUE@ libldtestplug3.la libldtestplug4.la
+
@ENABLE_PLUGINS_TRUE@libldtestplug_la_SOURCES = testplug.c
@ENABLE_PLUGINS_TRUE@libldtestplug_la_CFLAGS = -g -O2
@ENABLE_PLUGINS_TRUE@libldtestplug_la_LDFLAGS = -no-undefined -rpath /nowhere
@@ -980,6 +991,9 @@ ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $
@ENABLE_PLUGINS_TRUE@libldtestplug3_la_SOURCES = testplug3.c
@ENABLE_PLUGINS_TRUE@libldtestplug3_la_CFLAGS = -g -O2
@ENABLE_PLUGINS_TRUE@libldtestplug3_la_LDFLAGS = -no-undefined -rpath /nowhere
+@ENABLE_PLUGINS_TRUE@libldtestplug4_la_SOURCES = testplug4.c
+@ENABLE_PLUGINS_TRUE@libldtestplug4_la_CFLAGS = -g -O2
+@ENABLE_PLUGINS_TRUE@libldtestplug4_la_LDFLAGS = -no-undefined -rpath /nowhere
MAINTAINERCLEANFILES = configdoc.texi ld.1 ld.info
# We want to reconfigure if configure.host or configure.tgt changes.
@@ -1069,6 +1083,8 @@ libldtestplug2.la: $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_DEPENDENCIES
$(libldtestplug2_la_LINK) $(am_libldtestplug2_la_rpath) $(libldtestplug2_la_OBJECTS) $(libldtestplug2_la_LIBADD) $(LIBS)
libldtestplug3.la: $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_DEPENDENCIES) $(EXTRA_libldtestplug3_la_DEPENDENCIES)
$(libldtestplug3_la_LINK) $(am_libldtestplug3_la_rpath) $(libldtestplug3_la_OBJECTS) $(libldtestplug3_la_LIBADD) $(LIBS)
+libldtestplug4.la: $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_DEPENDENCIES) $(EXTRA_libldtestplug4_la_DEPENDENCIES)
+ $(libldtestplug4_la_LINK) $(am_libldtestplug4_la_rpath) $(libldtestplug4_la_OBJECTS) $(libldtestplug4_la_LIBADD) $(LIBS)
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -1502,6 +1518,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexsup.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libldtestplug2_la-testplug2.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libldtestplug3_la-testplug3.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libldtestplug4_la-testplug4.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libldtestplug_la-testplug.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mri.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pe-dll.Po@am__quote@
@@ -1550,6 +1567,13 @@ libldtestplug3_la-testplug3.lo: testplug3.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libldtestplug3_la_CFLAGS) $(CFLAGS) -c -o libldtestplug3_la-testplug3.lo `test -f 'testplug3.c' || echo '$(srcdir)/'`testplug3.c
+libldtestplug4_la-testplug4.lo: testplug4.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libldtestplug4_la_CFLAGS) $(CFLAGS) -MT libldtestplug4_la-testplug4.lo -MD -MP -MF $(DEPDIR)/libldtestplug4_la-testplug4.Tpo -c -o libldtestplug4_la-testplug4.lo `test -f 'testplug4.c' || echo '$(srcdir)/'`testplug4.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libldtestplug4_la-testplug4.Tpo $(DEPDIR)/libldtestplug4_la-testplug4.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='testplug4.c' object='libldtestplug4_la-testplug4.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libldtestplug4_la_CFLAGS) $(CFLAGS) -c -o libldtestplug4_la-testplug4.lo `test -f 'testplug4.c' || echo '$(srcdir)/'`testplug4.c
+
.l.c:
$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)