blob: fcc5e7fa12d69be328cd4d4411fb1c8a80d51b7c [file] [log] [blame]
Ben Elliston88e17b51998-09-21 01:22:07 +00001/* Force linking of classes required by Objective C runtime.
Thomas Koenigb18a97e2021-09-13 19:49:49 +02002 Copyright (C) 1997-2021 Free Software Foundation, Inc.
Ben Elliston88e17b51998-09-21 01:22:07 +00003 Contributed by Ovidiu Predescu (ovidiu@net-community.com).
4
Nathanael Nerode38709ca2003-05-23 20:25:39 +00005This file is part of GCC.
Ben Elliston88e17b51998-09-21 01:22:07 +00006
Nathanael Nerode38709ca2003-05-23 20:25:39 +00007GCC is free software; you can redistribute it and/or modify
Ben Elliston88e17b51998-09-21 01:22:07 +00008it under the terms of the GNU General Public License as published by
Jakub Jelinek748086b2009-04-09 17:00:19 +02009the Free Software Foundation; either version 3, or (at your option)
Ben Elliston88e17b51998-09-21 01:22:07 +000010any later version.
11
Nathanael Nerode38709ca2003-05-23 20:25:39 +000012GCC is distributed in the hope that it will be useful,
Ben Elliston88e17b51998-09-21 01:22:07 +000013but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
Jakub Jelinek748086b2009-04-09 17:00:19 +020017Under Section 7 of GPL version 3, you are granted additional
18permissions described in the GCC Runtime Library Exception, version
193.1, as published by the Free Software Foundation.
Ben Elliston88e17b51998-09-21 01:22:07 +000020
Jakub Jelinek748086b2009-04-09 17:00:19 +020021You should have received a copy of the GNU General Public License and
22a copy of the GCC Runtime Library Exception along with this program;
23see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
24<http://www.gnu.org/licenses/>. */
25
Nicola Pero6dead242010-09-11 22:47:14 +000026#include "objc-private/common.h"
Ben Elliston88e17b51998-09-21 01:22:07 +000027#include <objc/Object.h>
Ben Elliston88e17b51998-09-21 01:22:07 +000028
Nicola Pero1501d092010-10-17 11:01:31 +000029/* Generate references to Object class since it is needed by the
30 runtime system to run correctly. */
Ben Elliston88e17b51998-09-21 01:22:07 +000031
32void __objc_linking (void)
33{
Nicola Pero80e4b9e2011-06-07 19:37:35 +000034 [Object class];
Ben Elliston88e17b51998-09-21 01:22:07 +000035}
36