OAK BROOK, Ill. — Protesters were arrested after crossing a barricade outside McDonald’s headquarters on Wednesday, as hundreds demonstrated to call attention to the low pay earned by fast-food workers.

The actions come ahead of the company’s annual shareholders meeting Thursday, where it is also expected to be confronted on issues including its executive pay packages and marketing to children.

Early Wednesday, organizers changed the location of their demonstration after learning McDonald’s closed the building where they had planned their actions and told employees there to work from home. The corporate headquarters has several buildings on a sprawling campus.

Down the street from Hamburger University, dozens of police officers in riot gear warned protesters to disperse. People dressed in McDonald’s uniforms essentially volunteered to be arrested by peacefully crossing a barricade or remaining on the property after being asked to leave. Organizers said about 100 McDonald’s workers who traveled from around the country were arrested, along with community leaders and supporters.

Among them was Mary Kay Henry, president of the Service Employees International Union, who said she wanted McDonald’s workers to know her union members stood with them.

The SEIU has been providing financial and organizational support to the fast-food protests, which began in late 2012 in New York City and have been spreading to other cities and countries.

While turnout for the protests has varied, they’ve nevertheless struck a chord at a time when the gap between the country’s rich and poor has widened. Executive pay packages are coming under greater scrutiny too, and shareholders last week rebuked Chipotle Mexican Grill’s compensation of $25.1 million and $24.4 million for its co-CEOs in a nonbinding, advisory vote.

McDonald’s Corp. gave CEO Don Thompson a pay package worth $9.5 million last year.