diff options
author | Nick Clifton <nickc@redhat.com> | 2006-09-16 18:12:17 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2006-09-16 18:12:17 +0000 |
commit | 0112cd268b205d8176b8b4d00988a334822956cf (patch) | |
tree | 67d11340ff93c7dbc29c8917bc03d9d24555f43d /ld/emultempl/xtensaelf.em | |
parent | 4fa3602bd53183badf1d259128a5f951f32db8cb (diff) | |
download | gdb-0112cd268b205d8176b8b4d00988a334822956cf.zip gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.gz gdb-0112cd268b205d8176b8b4d00988a334822956cf.tar.bz2 |
* 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.
Diffstat (limited to 'ld/emultempl/xtensaelf.em')
-rw-r--r-- | ld/emultempl/xtensaelf.em | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em index 1135d27..bbee546 100644 --- a/ld/emultempl/xtensaelf.em +++ b/ld/emultempl/xtensaelf.em @@ -267,8 +267,7 @@ replace_instruction_table_sections (bfd *abfd, asection *sec) insn_sec_name = INSN_SEC_BASE_NAME; prop_sec_name = PROP_SEC_BASE_NAME; } - else if (strncmp (sec_name, LINKONCE_SEC_OLD_TEXT_BASE_NAME, - strlen (LINKONCE_SEC_OLD_TEXT_BASE_NAME)) == 0) + else if (CONST_STRNEQ (sec_name, LINKONCE_SEC_OLD_TEXT_BASE_NAME)) { insn_sec_name = sec_name; owned_prop_sec_name = (char *) xmalloc (strlen (sec_name) + 20); @@ -1207,9 +1206,9 @@ is_inconsistent_linkonce_section (asection *sec) return FALSE; /* Check if this is an Xtensa property section. */ - if (strncmp (sec_name + linkonce_len, "p.", 2) == 0) + if (CONST_STRNEQ (sec_name + linkonce_len, "p.")) name = sec_name + linkonce_len + 2; - else if (strncmp (sec_name + linkonce_len, "prop.", 5) == 0) + else if (CONST_STRNEQ (sec_name + linkonce_len, "prop.")) name = strchr (sec_name + linkonce_len + 5, '.') + 1; if (name) |