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] | |
2010/9/14 Richard Henderson <rth@redhat.com>:
> On 09/13/2010 01:25 AM, Kai Tietz wrote:
>> +/* Private segment collection list. ?*/
>> +struct seh_seg_list {
>> + ?struct seh_seg_list *next;
>> + ?segT seg;
>> + ?int subseg;
>> +};
>
> I think we'd be better off using either "splay-tree.h" or
> "hashtab.h" from libiberty.
Hmm, is there such a mass of different code-segments to be expected
within one file that we will see here a real gain using hash-tables?
>> + ?/* Check if code segment is marked as linked once. ?*/
>> + ?flags = bfd_get_section_flags (stdoutput, seg);
>> + ?flags &= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD | SEC_LINK_DUPLICATES_ONE_ONLY
>> + ? ?| SEC_LINK_DUPLICATES_SAME_SIZE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
> ...
>> + ?/* Apply possibly lined once flags to new generated segment, too. ?*/
>> + ?flags |= bfd_get_section_flags (stdoutput, in->seg);
>
> Separating these two bits of code is confusing. ?I initially
> wrote a sentence saying you weren't masking off the bits
> properly. ?That said, I don't think you really need to
> propagate default flags from .[px]data itself. ?Just OR in
>
> ?SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_DATA.
Ok, done.
Kai
--
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
Attachment:
discardable_seh.diff
Description: Binary data
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |