diff options
author | Alan Modra <amodra@gmail.com> | 2016-07-16 13:29:35 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2016-07-16 13:29:35 +0930 |
commit | 4212b42d795628dcc36bcffc7cf16175f7698305 (patch) | |
tree | ccc4026c32f6e7b701444b1309a0fa126d04e1bf /ld/ldlang.c | |
parent | 16412c3bc4b00ecbf87251bfd2c92584615412bb (diff) | |
download | binutils-gdb-4212b42d795628dcc36bcffc7cf16175f7698305.tar.gz |
Don't include libbfd.h outside of bfd, part 4
Not much to see here, just renaming a function.
bfd/
* targets.c (bfd_seach_for_target): Rename to..
(bfd_iterate_over_targets): ..this. Rewrite doc.
* bfd-in2.h: Regenerate.
ld/
* ldlang.c (open_output): Replace bfd_search_for_target with
bfd_iterate_over_targets. Localize vars.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 82d558243fd..aee87207773 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -3113,15 +3113,15 @@ open_output (const char *name) line? */ if (command_line.endian != ENDIAN_UNSET) { - const bfd_target *target; - enum bfd_endian desired_endian; - /* Get the chosen target. */ - target = bfd_search_for_target (get_target, (void *) output_target); + const bfd_target *target + = bfd_iterate_over_targets (get_target, (void *) output_target); /* If the target is not supported, we cannot do anything. */ if (target != NULL) { + enum bfd_endian desired_endian; + if (command_line.endian == ENDIAN_BIG) desired_endian = BFD_ENDIAN_BIG; else @@ -3143,8 +3143,8 @@ open_output (const char *name) /* Try to find a target as similar as possible to the default target, but which has the desired endian characteristic. */ - bfd_search_for_target (closest_target_match, - (void *) target); + bfd_iterate_over_targets (closest_target_match, + (void *) target); /* Oh dear - we could not find any targets that satisfy our requirements. */ |