diff options
author | Alan Modra <amodra@gmail.com> | 1999-05-17 03:21:46 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 1999-05-17 03:21:46 +0000 |
commit | 6d4d30bb14cca96f185a5cac3642560826b7e523 (patch) | |
tree | c1039cb1aa3dfffe34d073cde43c272b14b84154 /gas/write.c | |
parent | daa01f85d45228bb45378625876adb00f5afa4db (diff) | |
download | gdb-6d4d30bb14cca96f185a5cac3642560826b7e523.zip gdb-6d4d30bb14cca96f185a5cac3642560826b7e523.tar.gz gdb-6d4d30bb14cca96f185a5cac3642560826b7e523.tar.bz2 |
/
Move bitfield overflow checks to after the md_apply_fix call in
fixup_segment so that md_apply_fix has a chance to modify value.
Handle 8 and 16-bit pcrel relocs for i386.
Prototypes and other minor code cleanups.
Diffstat (limited to 'gas/write.c')
-rw-r--r-- | gas/write.c | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/gas/write.c b/gas/write.c index 18e6e10..13f78b9 100644 --- a/gas/write.c +++ b/gas/write.c @@ -2707,6 +2707,27 @@ fixup_segment (fixP, this_segment_type) } } + if (!fixP->fx_done) + { +#ifdef MD_APPLY_FIX3 + md_apply_fix3 (fixP, &add_number, this_segment_type); +#else +#ifdef BFD_ASSEMBLER + md_apply_fix (fixP, &add_number); +#else + md_apply_fix (fixP, add_number); +#endif +#endif + +#ifndef TC_HANDLES_FX_DONE + /* If the tc-* files haven't been converted, assume it's handling + it the old way, where a null fx_addsy means that the fix has + been applied completely, and no further work is needed. */ + if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0) + fixP->fx_done = 1; +#endif + } + if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0) { if ((size_t) size < sizeof (valueT)) @@ -2755,26 +2776,6 @@ fixup_segment (fixP, this_segment_type) #endif } /* not a bit fix */ - if (!fixP->fx_done) - { -#ifdef MD_APPLY_FIX3 - md_apply_fix3 (fixP, &add_number, this_segment_type); -#else -#ifdef BFD_ASSEMBLER - md_apply_fix (fixP, &add_number); -#else - md_apply_fix (fixP, add_number); -#endif -#endif - -#ifndef TC_HANDLES_FX_DONE - /* If the tc-* files haven't been converted, assume it's handling - it the old way, where a null fx_addsy means that the fix has - been applied completely, and no further work is needed. */ - if (fixP->fx_addsy == 0 && fixP->fx_pcrel == 0) - fixP->fx_done = 1; -#endif - } #ifdef TC_VALIDATE_FIX skip: ; #endif @@ -2824,7 +2825,7 @@ void write_print_statistics (file) FILE *file; { - fprintf (stderr, "fixups: %d\n", n_fixups); + fprintf (file, "fixups: %d\n", n_fixups); } /* for debugging */ |