+2021-05-07 Nick Clifton <nickc@redhat.com>
+
+ * ldelfgen.c (compare_link_order): Ignore section size when
+ performing a relocateable link.
+
2021-05-07 Alan Modra <amodra@gmail.com>
* ldexp.c (update_definedness): Don't return false for absolute
else if (apos > bpos)
return 1;
- /* The only way we should get matching LMAs is when the first of two
- sections has zero size. */
- if (asec->size < bsec->size)
- return -1;
- else if (asec->size > bsec->size)
- return 1;
+ if (! bfd_link_relocatable (&link_info))
+ {
+ /* The only way we should get matching LMAs is when
+ the first of the two sections has zero size. */
+ if (asec->size < bsec->size)
+ return -1;
+ else if (asec->size > bsec->size)
+ return 1;
+ }
/* If they are both zero size then they almost certainly have the same
VMA and thus are not ordered with respect to each other. Test VMA