_bfd_merged_section_offset() treats trailing symbols specially: That of
the retained section will be assigned the section size, while all ones in
replaced sections will be set to zero (which will then have output offset
added, i.e. generally the size of the retained section). However, in
neither case will the function change the section. Hence such trailing
symbols, when not originating from the retained section, will appear to
live in excluded sections, when they really belong to the sole retained
one.
Replace the section in all cases, and uniformly return section size.
/* xgettext:c-format */
(_("%pB: access beyond end of merged section (%" PRId64 ")"),
sec->owner, (int64_t) offset);
- return secinfo->first_str ? sec->size : 0;
+ *psec = sec = secinfo->reprsec;
+ return sec->size;
}
if (secinfo->fast_state != 2)