This function determines, based on the given section name, if the
sections belongs to the special sections category.
Add more special sections to special_sections[] along with a new
undefined_group_size() helper function returning 0 (undefined).
New special sections are: .altinstr_replacement.
Signed-off-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
Reviewed-by: Andra-Irina Paraschiv <andraprs@amazon.com>
Reviewed-by: Bjoern Doebel <doebel@amazon.de>
Reviewed-by: Norbert Manthey <nmanthey@amazon.de>
{},
};
+static int is_special_section(const struct section *sec)
+{
+ struct special_section *special;
+
+ for (special = special_sections; special->name; special++) {
+ if (!strcmp(sec->name, special->name))
+ return true;
+ }
+
+ return false;
+}
+
static int should_keep_rela_group(struct section *sec, int start, int size)
{
struct rela *rela;