|
From: Paul M. <pa...@sa...> - 2005-06-20 09:49:02
|
Julian Seward writes: > stage2.lds: Makefile > $(CC) -Wl,--verbose -nostdlib 2>&1 | sed \ > -e '1,/^=====\+$$/d' \ > -e '/^=====\+$$/d' \ > -e '/executable_start/s/0x[0-9A-Fa-f]\+/kickstart_base/g' > $@ > \ > || rm -f $@ > > I can see that the third "-e" substitutes out the first 0x08048000, > but I don't see how the second one is substituted. Does the -e thing > find a line containing "executable_start" and then do the given > substitution on the rest of the line, as many times as necessary? Yes, the 'g' at the end of the command means "global", i.e. replace all instances. > On a platform where it fails (RH73) the default script has this > > . = 0x08048000 + SIZEOF_HEADERS; > > and it is unchanged in the post-sed-ified result. > > > I must say I'm not convinced by this change. It seems overly > fragile. How it was before, the entry address (0x8048000 / whatever) > would be changed to 'kickstart_base' regardless of the surrounding > context, which sounds like the Right Thing To Do; whereas now we're > context dependent. The idea was to remove the dependence on the specific 0x8048000 value. Does the RH73 default script have any other hex numbers in it before the 0x08048000? How about we just modify the first line that has a hex number in it? Paul. |