Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137899132
D1152.id2593.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1152.id2593.diff
View Options
Index: contrib/binutils/bfd/elflink.c
===================================================================
--- contrib/binutils/bfd/elflink.c
+++ contrib/binutils/bfd/elflink.c
@@ -4356,9 +4356,38 @@
--no-add-needed is used. */
if ((elf_dyn_lib_class (abfd) & DYN_NO_NEEDED) != 0)
{
+ bfd_boolean looks_soish;
+ const char *print_name;
+ int print_len;
+ size_t len, lend = 0;
+
+ looks_soish = FALSE;
+ print_name = soname;
+ print_len = strlen(soname);
+ if (strncmp(soname, "lib", 3) == 0)
+ {
+ len = print_len;
+ if (len > 5 && strcmp(soname + len - 2, ".a") == 0)
+ lend = len - 5;
+ else
+ {
+ while (len > 6 && (ISDIGIT(soname[len - 1]) ||
+ soname[len - 1] == '.'))
+ len--;
+ if (strncmp(soname + len - 3, ".so", 3) == 0)
+ lend = len - 6;
+ }
+ if (lend != 0)
+ {
+ print_name = soname + 3;
+ print_len = lend + 1;
+ looks_soish = TRUE;
+ }
+ }
+
(*_bfd_error_handler)
- (_("%B: invalid DSO for symbol `%s' definition"),
- abfd, name);
+ (_("undefined reference to symbol `%s' (try adding -l%s%.*s)"),
+ name, looks_soish? "" : ":", print_len, print_name);
bfd_set_error (bfd_error_bad_value);
goto error_free_vers;
}
Index: contrib/binutils/bfd/po/bfd.pot
===================================================================
--- contrib/binutils/bfd/po/bfd.pot
+++ contrib/binutils/bfd/po/bfd.pot
@@ -2438,9 +2438,9 @@
msgid "Warning: size of symbol `%s' changed from %lu in %B to %lu in %B"
msgstr ""
-#: elflink.c:4309
+#: elflink.c:4388
#, c-format
-msgid "%B: invalid DSO for symbol `%s' definition"
+msgid "undefined reference to symbol `%s' (try adding -l%s%s)"
msgstr ""
#: elflink.c:5535
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 28, 12:37 AM (3 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26268534
Default Alt Text
D1152.id2593.diff (1 KB)
Attached To
Mode
D1152: (PR 194296) bfd: Improve common ELF linking error message
Attached
Detach File
Event Timeline
Log In to Comment