select_rtx_section and relocations on Darwin.

Geoff Keating geoffk@geoffk.org
Sun Sep 21 00:14:00 GMT 2003


> From: Andrew Pinski <pinskia@physics.uc.edu>
> Date: Sat, 20 Sep 2003 13:44:02 -0700

> Geoff,
> 
> Your patch for fixing this problem was not right for the dynamic-no-pic 
> case or the static case.
> The right macro to check is MACHOPIC_INDIRECT (not 
> MACHO_DYNAMIC_NO_PIC_P) which says
> either PIC code or dynamic-no-pic code is being generated (not just 
> static or no PIC code).
> Since dynamic-no-pic still need most of the same as PIC code when 
> dealing with
> relocations, unlike non-PIC code. This patch fixes this problem. Also 
> it fixes gap
> (part of SPEC CPU 2000) when compiled with -mdynamic-no-pic which fails 
> currently.
> 
> Ok?

This is OK.

I thought I'd taken that check from a few lines above, in
machopic_select_section, but that uses MACHOPIC_INDIRECT so I must be
mistaken...

> ChangeLog:
> 	* config/darwin.c (machopic_select_rtx_section): Fix check for PIC 
> code.
-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list