Re: [Linux-ia64] sprofil() implementation

Andreas Schwab
2001-03-21T10:02:16Z

David Mosberger <davidm@hpl.hp.com> writes:

|> +size_t taddr[] |> + {
|> + 0x00001000, /* elf32/hppa */
|> + 0x08048000, /* elf32/x86 */
|> + 0x00400000, /* elf32/mips */
|> + 0x01800000, /* elf32/ppc */
|> + 0x00010000, /* elf32/sparc */
|> + 0x4000000000000000, /* elf64/ia64 */
|> + 0x0000000120000000, /* elf64/alpha */
|> + 0x4000000000001000, /* elf64/hppa */
|> + 0x0000000100000000 /* elf64/sparc */
|> + };

This is missing the address for elf32/m68k, which is 0x80000000. Note
that you will get a warning on 32 bit systems for the 64 bit constants.

|> + prof[profcnt].pr_off = (size_t) taddr[i];

The cast is useless.

Andreas.

--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5