This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to not create GOT and dynamic relocation entries for unresolved symbols with --warn-unresolved-symbols.

        * options.h (--warn-unresolved-symbols): New option.


        * (Symbol_table::sized_write_globals): Change symbol
        binding to weak with new option.
        * symtab.h (is_weak_undefined): Check for new option.
        (is_strong_undefined): Check for new option.
        * testsuite/ New test.
        * testsuite/ Regenerate.
        * testsuite/ New file.

This file is missing from the patch. (Don't forget to "git add".)

        * Side-effect from running automake.

Since you didn't change Makefile, just remove this from the patch
("git checkout Makefile" after running automake). Otherwise, we'll
keep ping-ponging uselessly between the two (or more) variations that
automake generates.

+      // If --weak-unresolved-symbols is set, change binding of unresolved
+      // global symbols to STB_WEAK.
+      if (parameters->options().weak_unresolved_symbols()
+         && (binding == elfcpp::STB_GLOBAL
+             || binding == elfcpp::STB_LOCAL)

Why check for STB_LOCAL? Local symbols can't be unresolved. What about
STB_GNU_UNIQUE symbols? (Perhaps that's what you meant.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]