I can see that all your threads are related but I can't with any certainty really see how. My current understanding is that you have a set of files (the object files) that contain key words that need to be replaced by another word/value. The replacement values seem to be defined in another set of files ( the key definition files). I don't see how this relates to the title of this
thread but ...
It seems to me that you need to read the replacement word/values for the files and build a (old value, new value) map. You then need to read ( a line at a time ) each of the files containing the targets to be replaced and then for each line read replace all the words in these lines if they match the key words in the map.
If this is the case then you seem to need to -
a) generate the (old value, new value) map from the key definition files.
b) for each file the object file set
define a file to write the result into,
read each line of the object file,
for each line replace all words that have matching entries in the map
write the modified line to the result file.
I can think of many many ways to implement the replacement part but much depends on how many key values there are.