summaryrefslogtreecommitdiff
path: root/bfd/nlmcode.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-09-28 12:59:25 +0000
committerNick Clifton <nickc@redhat.com>2006-09-28 12:59:25 +0000
commit2f1d1ef4b72a94458ccf9496e8854c259167c8e3 (patch)
tree81410c70c9ddf09b1e2a1e2fb037994cfe9395f1 /bfd/nlmcode.h
parent0645dc1eb047dbf71dfac1c192f88086865e4c58 (diff)
downloadbinutils-redhat-2f1d1ef4b72a94458ccf9496e8854c259167c8e3.tar.gz
* bfd-in.h (CONST_STRNCPY) : Delete.
(LITSTRCPY) : New. (LITMEMCPY) : New. * bfd-in2.h : Regenerate. * elflink.c (bfd_elf_gc_sections) : Use LITMEMCPY. Don't manually calculate string lengths. * nlmcode.h (nlm_swap_auxiliary_headers_in) : Use LITMEMCPY. * nlmconv.c (main) : Use LITMEMCPY. * prdbg.c (tg_class_static_member) : Use LITSTRCPY.
Diffstat (limited to 'bfd/nlmcode.h')
-rw-r--r--bfd/nlmcode.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/bfd/nlmcode.h b/bfd/nlmcode.h
index 30e6f47b35..507d5d6447 100644
--- a/bfd/nlmcode.h
+++ b/bfd/nlmcode.h
@@ -364,7 +364,7 @@ nlm_swap_auxiliary_headers_in (bfd *abfd)
if (bfd_seek (abfd, pos, SEEK_SET) != 0)
return FALSE;
- memcpy (nlm_cygnus_ext_header (abfd), STRING_COMMA_LEN ("CyGnUsEx"));
+ LITMEMCPY (nlm_cygnus_ext_header (abfd), "CyGnUsEx");
nlm_cygnus_ext_header (abfd)->offset = dataOffset;
nlm_cygnus_ext_header (abfd)->length = dataLength;
@@ -645,7 +645,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Version_Header thdr;
- memcpy (thdr.stamp, STRING_COMMA_LEN ("VeRsIoN#"));
+ LITMEMCPY (thdr.stamp, "VeRsIoN#");
put_word (abfd, (bfd_vma) nlm_version_header (abfd)->majorVersion,
(bfd_byte *) thdr.majorVersion);
put_word (abfd, (bfd_vma) nlm_version_header (abfd)->minorVersion,
@@ -672,7 +672,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Copyright_Header thdr;
- memcpy (thdr.stamp, STRING_COMMA_LEN ("CoPyRiGhT="));
+ LITMEMCPY (thdr.stamp, "CoPyRiGhT=");
amt = sizeof (thdr.stamp);
if (bfd_bwrite ((void *) thdr.stamp, amt, abfd) != amt)
return FALSE;
@@ -694,7 +694,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Extended_Header thdr;
- memcpy (thdr.stamp, STRING_COMMA_LEN ("MeSsAgEs"));
+ LITMEMCPY (thdr.stamp, "MeSsAgEs");
put_word (abfd,
(bfd_vma) nlm_extended_header (abfd)->languageID,
(bfd_byte *) thdr.languageID);
@@ -797,7 +797,7 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
ds = find_nonzero (nlm_custom_header (abfd)->dataStamp,
sizeof (nlm_custom_header (abfd)->dataStamp));
- memcpy (thdr.stamp, STRING_COMMA_LEN ("CuStHeAd"));
+ LITMEMCPY (thdr.stamp, "CuStHeAd");
hdrLength = (2 * NLM_TARGET_LONG_SIZE + (ds ? 8 : 0)
+ nlm_custom_header (abfd)->hdrLength);
put_word (abfd, hdrLength, thdr.length);
@@ -831,14 +831,14 @@ nlm_swap_auxiliary_headers_out (bfd *abfd)
{
Nlm_External_Custom_Header thdr;
- memcpy (thdr.stamp, STRING_COMMA_LEN ("CuStHeAd"));
+ LITMEMCPY (thdr.stamp, "CuStHeAd");
put_word (abfd, (bfd_vma) 2 * NLM_TARGET_LONG_SIZE + 8,
(bfd_byte *) thdr.length);
put_word (abfd, (bfd_vma) nlm_cygnus_ext_header (abfd)->offset,
(bfd_byte *) thdr.dataOffset);
put_word (abfd, (bfd_vma) nlm_cygnus_ext_header (abfd)->length,
(bfd_byte *) thdr.dataLength);
- memcpy (thdr.dataStamp, STRING_COMMA_LEN ("CyGnUsEx"));
+ LITMEMCPY (thdr.dataStamp, "CyGnUsEx");
amt = sizeof (thdr);
if (bfd_bwrite ((void *) &thdr, amt, abfd) != amt)
return FALSE;