From 6b3823ed1a555f66a70a9de90638f837b9ed791a Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 25 May 1998 23:36:43 +0000 Subject: [PATCH] ...And calculate same when building the armap (for ranlib). --- gnu/dist/bfd/archive.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/dist/bfd/archive.c b/gnu/dist/bfd/archive.c index 25ffb39b0f7e..6d2efd2c3f5a 100644 --- a/gnu/dist/bfd/archive.c +++ b/gnu/dist/bfd/archive.c @@ -1959,8 +1959,11 @@ bsd_write_armap (arch, elength, map, orl_count, stridx) { do { - firstreal += arelt_size (current) + sizeof (struct ar_hdr); - firstreal += firstreal % 2; + unsigned int size = arelt_size (current); + if (!strncmp(arch_hdr (current)->ar_name, "#1/", 3)) + size += strlen(normalize(current, current->filename)); + firstreal += size + sizeof (struct ar_hdr); + firstreal += size % 2; current = current->next; } while (current != (bfd *) (map[count]).pos);