All code which doesn't call memXXX() can be shared between rom and ram stage. Moving strdup() and strconcat() into a separate file and leaving the rest in string.h is the easiest way to get it working.

You shouldn't be doing this because of the romstage/ramstage issue, that's not related to this. That should be solved by including them in romstage but calling dead_code() for it like we mentioned on the other CL.

This should be done (in my opinion) independently of that because there's no clear reason to have those functions be static inlines and it doesn't fit how we normally write code. But that argumentation also works for the other functions I mentioned (I think the ctype stuff is small enough that you can *actually* argue they can probably be inlines, which may facilitate further optimization, but I don't really see that applying to any of the others.)

View Change

To view, visit change 31141. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0b9833fbf6742d110ee4bfc00cd650f219aebb2c
Gerrit-Change-Number: 31141
Gerrit-PatchSet: 2
Gerrit-Owner: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer@coreboot.org>
Gerrit-Reviewer: Thomas Heijligen <src@posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Tue, 29 Jan 2019 22:37:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment