tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Fixing Elf##_Versym



In article <4d8ba3e2-e981-4fa8-8685-17c1ba27b191%app.fastmail.com@localhost>,
Joseph Koshy <netbsd-ml%jkoshy.net@localhost> wrote:
>Hello tech-toolchain,
>
>Many ELF toolkits define an Elf##_Versym to be a 16-bit unsigned
>quantity:
>
>  /* Solaris, FreeBSD, Elfutils, Elftoolchain, maybe others. */
>  typedef Elf32_Half Elf32_Versym;
>  typedef Elf64_Half Elf64_Versym;
>
>NetBSD however defines it as a struct with a sole 16-bit unsigned
>member:
>
>  /* NetBSD: <sys/exec_elf.h> */
>  typedef struct {
>  	Elf32_Half	vs_vers;
>  } Elf32_Versym;
>  typedef Elf32_Versym	Elf64_Versym;
>
>I would like to align NetBSD's definitions with those in the
>other toolkits, so that it becomes easier to port ELF-handling
>code to NetBSD.
>
>Would anyone have objections to the below patch?  Per my
>understanding, the patch does not change runtime behavior.

I am fine with the change, it reduces diff in rtld with FreeBSD too.

christos



Home | Main Index | Thread Index | Old Index