Hi James, > > +# Sign-extend the entry point to 64 bits if retrieved as a 32-bit number. > > +entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \ > > + | sed -n '/^start address / { \ > > + s/^.*0x\([0-7].......\)$$/0x00000000\1/; \ > > + s/^.*0x\(........\)$$/0xffffffff\1/; p }') > > This leaves the "start address " on the beginning if the address is > already 64 bits wide, e.g.: > > VMLINUX_LOAD_ADDRESS=0xffffffff80100000 VMLINUX_ENTRY_ADDRESS=start address 0xffffffff80832720 ... Right, sorry about it. > The following seems to work, to drop the "start address " first then > work purely on the hex value (i.e. no need for .* at the front of the > sign extension regexes any more): > > +entry-y = $(shell $(OBJDUMP) -f vmlinux 2>/dev/null \ > + | sed -n '/^start address / { \ > + s/^.* //; \ > + s/^0x\([0-7].......\)$$/0x00000000\1/; \ > + s/^0x\(........\)$$/0xffffffff\1/; p }') > > Look reasonable? Is there a cleaner way? Then there's no need to match the beginning again with `^' either. Otherwise I think it's reasonable enough. I'll post v3. Thanks for your input! Maciej