This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
aarch64: don't use MIN in dl-machine.h [committed]
- From: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Cc: nd at arm dot com
- Date: Wed, 04 Oct 2017 17:51:40 +0100
- Subject: aarch64: don't use MIN in dl-machine.h [committed]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Szabolcs dot Nagy at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
MIN is used, but param.h may not be included, so expand its
single use inline.
2017-10-04 Szabolcs Nagy <szabolcs.nagy@arm.com>
* sysdeps/aarch64/dl-machine.h (elf_machine_rela): Expand MIN.
diff --git a/sysdeps/aarch64/dl-machine.h b/sysdeps/aarch64/dl-machine.h
index 60472036f5..b1245476dc 100644
--- a/sysdeps/aarch64/dl-machine.h
+++ b/sysdeps/aarch64/dl-machine.h
@@ -312,7 +312,8 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc,
RTLD_PROGNAME, strtab + refsym->st_name);
}
memcpy (reloc_addr_arg, (void *) value,
- MIN (sym->st_size, refsym->st_size));
+ sym->st_size < refsym->st_size
+ ? sym->st_size : refsym->st_size);
break;
case AARCH64_R(RELATIVE):