> > + if (strcmp (os->name, secname) == 0) > > You don't need to check the name here, Why not? How else are we going to know which output section to assign the section to?