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]

Re: [PATCH] Introduce new .text.sorted.* sections.


> Ok, based on the review, I decided to come up with a special logic
> in Input_section_sort_section_prefix_special_ordering_compare. The function
> uses strcmp, so one can happily use any .text.sorted.FOO names.

+  else if (strstr(s1_section_name, ".text.sorted") == s1_section_name)
+    return strcmp(s1_section_name, s2_section_name) <= 0;

I think you meant to use is_prefix_of (which uses strncmp) instead of
strstr. As written, it'll match section names like
".foo.text.sorted.bar", and will take longer.

OK with that change. Thanks!

-cary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]