Deleted Added
full compact
merge.c (104834) merge.c (107492)
1/* SEC_MERGE support.
2 Copyright 2001, 2002 Free Software Foundation, Inc.
3 Written by Jakub Jelinek <jakub@redhat.com>.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by

--- 339 unchanged lines hidden (view full) ---

348 break;
349
350 off += len;
351 }
352
353 if (alignment_power)
354 free (pad);
355
1/* SEC_MERGE support.
2 Copyright 2001, 2002 Free Software Foundation, Inc.
3 Written by Jakub Jelinek <jakub@redhat.com>.
4
5 This file is part of BFD, the Binary File Descriptor library.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by

--- 339 unchanged lines hidden (view full) ---

348 break;
349
350 off += len;
351 }
352
353 if (alignment_power)
354 free (pad);
355
356 return entry == NULL || entry->secinfo != secinfo;
356 return (boolean) (entry == NULL || entry->secinfo != secinfo);
357}
358
359/* This function is called for each input file from the add_symbols
360 pass of the linker. */
361
362boolean
363_bfd_merge_section (abfd, psinfo, sec, psecinfo)
364 bfd *abfd;

--- 297 unchanged lines hidden (view full) ---

662 PTR *p;
663
664 e = *a;
665 e->u.entsize = sinfo->htab->entsize;
666 if (e->len <= e->u.entsize)
667 break;
668 if (e->len > 4 * e->u.entsize)
669 {
357}
358
359/* This function is called for each input file from the add_symbols
360 pass of the linker. */
361
362boolean
363_bfd_merge_section (abfd, psinfo, sec, psecinfo)
364 bfd *abfd;

--- 297 unchanged lines hidden (view full) ---

662 PTR *p;
663
664 e = *a;
665 e->u.entsize = sinfo->htab->entsize;
666 if (e->len <= e->u.entsize)
667 break;
668 if (e->len > 4 * e->u.entsize)
669 {
670 s = e->root.string + e->len - e->u.entsize;
670 s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
671 hash = 0;
672 for (i = 0; i < 4 * e->u.entsize; i++)
673 {
674 c = *--s;
675 hash += c + (c << 17);
676 hash ^= hash >> 2;
677 }
678 p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);

--- 6 unchanged lines hidden (view full) ---

685 ent = (struct sec_merge_hash_entry *) *p;
686 e->u.suffix = ent;
687 e->alignment = 0;
688 continue;
689 }
690 else
691 *p = (PTR) e;
692 }
671 hash = 0;
672 for (i = 0; i < 4 * e->u.entsize; i++)
673 {
674 c = *--s;
675 hash += c + (c << 17);
676 hash ^= hash >> 2;
677 }
678 p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);

--- 6 unchanged lines hidden (view full) ---

685 ent = (struct sec_merge_hash_entry *) *p;
686 e->u.suffix = ent;
687 e->alignment = 0;
688 continue;
689 }
690 else
691 *p = (PTR) e;
692 }
693 s = e->root.string + e->len - e->u.entsize;
693 s = (const unsigned char *) (e->root.string + e->len - e->u.entsize);
694 hash = 0;
695 for (i = 0; i < e->u.entsize; i++)
696 {
697 c = *--s;
698 hash += c + (c << 17);
699 hash ^= hash >> 2;
700 }
701 p = htab_find_slot_with_hash (lasttab, e, hash, INSERT);

--- 249 unchanged lines hidden ---
694 hash = 0;
695 for (i = 0; i < e->u.entsize; i++)
696 {
697 c = *--s;
698 hash += c + (c << 17);
699 hash ^= hash >> 2;
700 }
701 p = htab_find_slot_with_hash (lasttab, e, hash, INSERT);

--- 249 unchanged lines hidden ---