forked from Imagelibrary/binutils-gdb
* bfd-in.h (STRING_AND_COMMA): New macro. Takes one constant string as its
argument and emits the string followed by a comma and then the length of the string. (CONST_STRNEQ): New macro. Checks to see if a variable string has a constant string as its initial characters. (CONST_STRNCPY): New macro. Copies a constant string to the start of a variable string. * bfd-in2.h: Regenerate. * <remainign files>: Make use of the new macros.
This commit is contained in:
@@ -562,11 +562,11 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
|
||||
|
||||
#undef WRAP
|
||||
|
||||
#undef REAL
|
||||
#undef REAL
|
||||
#define REAL "__real_"
|
||||
|
||||
if (*l == '_'
|
||||
&& strncmp (l, REAL, sizeof REAL - 1) == 0
|
||||
&& CONST_STRNEQ (l, REAL)
|
||||
&& bfd_hash_lookup (info->wrap_hash, l + sizeof REAL - 1,
|
||||
FALSE, FALSE) != NULL)
|
||||
{
|
||||
@@ -1659,8 +1659,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info,
|
||||
s = name + 1;
|
||||
while (*s == '_')
|
||||
++s;
|
||||
if (s[0] == 'G'
|
||||
&& strncmp (s, CONS_PREFIX, CONS_PREFIX_LEN - 1) == 0)
|
||||
if (s[0] == 'G' && CONST_STRNEQ (s, CONS_PREFIX))
|
||||
{
|
||||
char c;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user