This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Mon, Sep 12, 2011 at 4:51 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Sep 12, 2011 at 02:50:07PM -0700, H.J. Lu wrote:
>> + ? ? ?/* Remove the group section if all members are removed. ?*/
>> + ? ? ?if (!bfd_get_full_section_contents (abfd, sec, &memhunk))
>> + ? ? {
>> + ? ? ? status = 1;
>> + ? ? ? bfd_nonfatal_message (NULL, abfd, sec, NULL);
>> + ? ? ? return TRUE;
>> + ? ? }
>> +
>> + ? ? ?src = memhunk + bfd_section_size (abfd, sec) - 4;
>> + ? ? ?for (; src > memhunk; src -= 4)
>> + ? ? {
>> + ? ? ? unsigned int idx;
>> + ? ? ? Elf_Internal_Shdr *shdr;
>> + ? ? ? idx = H_GET_32 (abfd, src);
>> + ? ? ? shdr = elf_elfsections (abfd)[idx];
>> + ? ? ? if (!is_strip_section_1 (abfd, shdr->bfd_section))
>> + ? ? ? ? break;
>> + ? ? }
>> +
>> + ? ? ?free (memhunk);
>> +
>> + ? ? ?if (src == memhunk)
>> + ? ? return TRUE;
>
> I think it would be better if you didn't duplicate the low level
> group handling code here. ?Iterate over the group sections using
> elf_next_in_group.
>
How about this patch?
Thanks.
--
H.J.
Attachment:
binutils-pr13180-1.patch
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |