Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Andrew Cagney - aka Noid
Thu, 15 Oct 1992 05:03
[binutils-2.0/bfd/reloc.c] Make clear what reloc_funcs should do...
Author: Andrew Cagney - aka Noid
Date: Thu, 15 Oct 1992 05:03
Date: Thu, 15 Oct 1992 05:03
67 lines
2311 bytes
2311 bytes
[This is a cosmetic change]
In binutils-2.0/bfd/reloc.c:bfd_perform_relocation() the following code
sequence occures:
if symbol undefined
flag = bfd_reloc_undefined
if have special_relocation_funciton
cont = special_relocation_function()
if cont != continue
return cont
<rest of relocation code>
The patch below rearanges this code to be:
if have special_relocation_funciton
cont = special_relocation_function()
if cont != continue
return cont
if symbol undefined
flag = bfd_reloc_undefined
<rest of relocation code>
Which makes it more obivous to the user that a special_relocation_function()
must check (and possibly return the corresponding status) for undefined
symbols.
Andrew Cagney
cagney@winnie% rcsdiff -c bfd/reloc.c
===================================================================
RCS file: bfd/RCS/reloc.c,v
retrieving revision 1.1
diff -c -r1.1 bfd/reloc.c
*** /tmp/RCSAa15969 Thu Oct 15 11:00:13 1992
--- bfd/reloc.c Thu Oct 15 10:44:36 1992
***************
*** 452,461 ****
}
- if ((symbol->section == &bfd_und_section) && output_bfd == (bfd *)NULL) {
- flag = bfd_reloc_undefined;
- }
-
if (howto->special_function) {
bfd_reloc_status_type cont;
cont = howto->special_function(abfd,
--- 452,457 ----
***************
*** 465,470 ****
--- 461,470 ----
input_section,
output_bfd);
if (cont != bfd_reloc_continue) return cont;
+ }
+
+ if ((symbol->section == &bfd_und_section) && output_bfd == (bfd *)NULL) {
+ flag = bfd_reloc_undefined;
}
/*
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads