mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-29 15:00:34 +00:00
* archive.c (bfd_dont_truncate_arname): Add the ar padding
character, if there is room for it, even if the name is the maximum length. PR 5859.
This commit is contained in:
parent
2d2d08ed7b
commit
da6c4a8b3c
@ -1,5 +1,9 @@
|
||||
Mon Oct 31 14:19:08 1994 Ian Lance Taylor <ian@sanguine.cygnus.com>
|
||||
|
||||
* archive.c (bfd_dont_truncate_arname): Add the ar padding
|
||||
character, if there is room for it, even if the name is the
|
||||
maximum length.
|
||||
|
||||
* elfcode.h (assign_file_positions_except_relocs): Sort the ELF
|
||||
headers by section address when assigning file positions.
|
||||
(elf_sort_hdrs): New static function.
|
||||
|
@ -1412,7 +1412,9 @@ bfd_dont_truncate_arname (abfd, pathname, arhdr)
|
||||
if (length <= maxlen)
|
||||
memcpy (hdr->ar_name, filename, length);
|
||||
|
||||
if (length < maxlen)
|
||||
/* Add the padding character if there is room for it. */
|
||||
if (length < maxlen
|
||||
|| (length == maxlen && length < sizeof hdr->ar_name))
|
||||
(hdr->ar_name)[length] = ar_padchar (abfd);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user